@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ================================================================
   DESIGN TOKENS — тёмная тема (default) — PulseSync style
   ================================================================ */
:root {
  /* backgrounds — pure black like PulseSync */
  --bg:       #090909;
  --bg1:      #0f0f0f;
  --bg2:      #141414;
  --bg3:      #1c1c1c;
  --bg-glass: rgba(255,255,255,0.03);
  --bg-glass2:rgba(255,255,255,0.06);

  /* borders */
  --line:     rgba(255,255,255,0.07);
  --line2:    rgba(255,255,255,0.11);
  --line3:    rgba(255,255,255,0.18);

  /* accent yellow — brand */
  --y:        #F5C000;
  --y2:       #FFD44D;
  --ybg:      rgba(245,192,0,0.06);
  --ybg2:     rgba(245,192,0,0.12);
  --y-glow:   rgba(245,192,0,0.18);

  /* text */
  --txt:      #ECECEC;
  --txt2:     #6b6b6b;
  --txt3:     #3d3d3d;
  --txt-inv:  #090909;

  /* nav */
  --nav-bg:   rgba(9,9,9,0.82);
  --nav-blur: 22px;

  /* shadows */
  --shadow-card: 0 2px 12px rgba(0,0,0,0.5);
  --shadow-hover: 0 8px 28px rgba(0,0,0,0.65), 0 0 0 1px rgba(245,192,0,0.1);

  /* radius */
  --r-sm:  8px;
  --r-md:  10px;
  --r-lg:  14px;

  /* misc */
  --mono: 'JetBrains Mono', monospace;
}

/* ================================================================
   LIGHT THEME
   ================================================================ */
[data-theme="light"] {
  --bg:       #f4f5f9;
  --bg1:      #ffffff;
  --bg2:      #eef0f5;
  --bg3:      #e3e5ee;
  --bg-glass: rgba(255,255,255,0.7);
  --bg-glass2:rgba(255,255,255,0.92);

  --line:     rgba(0,0,0,0.08);
  --line2:    rgba(0,0,0,0.13);
  --line3:    rgba(0,0,0,0.2);

  --txt:      #18181e;
  --txt2:     #52526e;
  --txt3:     #9898b0;
  --txt-inv:  #ffffff;

  --nav-bg:   rgba(244,245,249,0.85);
  --nav-blur: 20px;

  --shadow-card: 0 2px 14px rgba(0,0,0,0.07);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.12), 0 0 0 1px rgba(245,192,0,0.18);

  --y-glow:   rgba(245,192,0,0.14);
}

/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--txt);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

/* Stars canvas */
#stars-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s;
}
[data-theme="light"] #stars-canvas { opacity: 0; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 4px; }

img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.page-body { padding-top: 64px; }

/* ================================================================
   NAVIGATION — PulseSync layout: logo left | links center | right
   ================================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 800;
  height: 64px;
  background: var(--nav-bg);
  backdrop-filter: blur(var(--nav-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--nav-blur)) saturate(160%);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 1rem;
  transition: background 0.3s, border-color 0.3s;
}

/* Brand — left */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--txt);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  transition: opacity 0.18s;
}
.nav-brand:hover { opacity: 0.75; }
.nav-brand-icon {
  width: 28px; height: 28px;
  background: var(--y);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
  color: #000;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

/* Links — center */
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  list-style: none;
  flex: 1;
}

.nav-links a {
  display: block;
  padding: 0.42rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--txt2);
  text-decoration: none;
  transition: color 0.18s, background 0.18s;
  border-radius: var(--r-sm);
}

.nav-links a:hover { color: var(--txt); background: var(--bg-glass2); }

.nav-links a.active {
  color: var(--txt);
  background: var(--bg-glass2);
  border: 1px solid var(--line2);
}

.nav-cta {
  background: var(--y) !important;
  color: #000 !important;
  font-weight: 700 !important;
  border: none !important;
}
.nav-cta:hover {
  background: var(--y2) !important;
  color: #000 !important;
}

/* Right actions */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* Theme toggle */
.theme-toggle {
  width: 36px; height: 36px;
  background: var(--bg-glass2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  color: var(--txt2);
}
.theme-toggle:hover {
  background: var(--bg2);
  color: var(--y);
  border-color: rgba(245,192,0,0.3);
}
.theme-toggle svg { width: 16px; height: 16px; }
.icon-sun  { display: none; }
.icon-moon { display: block; }
[data-theme="light"] .icon-sun  { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.burger span {
  display: block;
  width: 21px; height: 2px;
  background: var(--txt2);
  border-radius: 2px;
  transition: 0.25s;
}

/* ================================================================
   FOOTER — PulseSync style
   ================================================================ */
footer {
  border-top: 1px solid var(--line);
  padding: 3.5rem 2rem 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.foot-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.foot-brand {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--txt);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.foot-brand-icon {
  width: 24px; height: 24px;
  background: var(--y);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 900;
  color: #000;
}
.foot-brand span { color: var(--y); }

.foot-desc {
  font-size: 0.78rem;
  color: var(--txt3);
  line-height: 1.8;
  max-width: 220px;
  margin-bottom: 1.2rem;
}

.foot-soc {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.foot-soc a {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.71rem;
  font-weight: 600;
  color: var(--txt3);
  transition: border-color 0.18s, color 0.18s, background 0.18s;
  text-decoration: none;
}
.foot-soc a:hover { border-color: var(--y); color: var(--y); background: var(--ybg); }
.foot-soc a svg { width: 13px; height: 13px; }

.foot-col-title {
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--txt3);
  margin-bottom: 1rem;
}

.foot-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.foot-col ul a {
  font-size: 0.82rem;
  color: var(--txt2);
  transition: color 0.18s;
  text-decoration: none;
}
.foot-col ul a:hover { color: var(--y); }

.foot-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.73rem;
  color: var(--txt3);
}

/* Theme toggle in footer */
.foot-theme-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-glass2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--txt2);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.foot-theme-btn:hover { background: var(--bg2); color: var(--y); border-color: rgba(245,192,0,0.25); }
.foot-theme-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ================================================================
   COMMON COMPONENTS
   ================================================================ */
.tag {
  display: inline-block;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--y);
  background: var(--ybg2);
  border: 1px solid rgba(245,192,0,0.18);
  padding: 3px 11px;
  border-radius: 100px;
}

.sec-title {
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  font-weight: 800;
  color: var(--txt);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.sec-title em { font-style: normal; color: var(--y); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.65rem 1.3rem;
  border-radius: var(--r-sm);
  font-size: 0.86rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.18s;
  text-decoration: none;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-y {
  background: var(--y);
  color: #000;
  box-shadow: 0 4px 16px var(--y-glow);
}
.btn-y:hover { background: var(--y2); transform: translateY(-1px); }

.btn-dc { background: #5865F2; color: #fff; }
.btn-dc:hover { background: #4752c4; transform: translateY(-1px); }

.btn-tg { background: #29B6F6; color: #fff; }
.btn-tg:hover { background: #0399d4; transform: translateY(-1px); }

.btn-fp { background: #2ECC71; color: #fff; }
.btn-fp:hover { background: #27b560; transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--txt2);
  border: 1px solid var(--line2);
}
.btn-ghost:hover { background: var(--bg-glass2); color: var(--txt); border-color: var(--line3); }

.btn-ghost--bright {
  color: var(--y);
  border-color: rgba(245,192,0,0.35);
  background: var(--ybg2);
}
.btn-ghost--bright:hover { background: var(--ybg); border-color: var(--y); color: var(--y); }

/* Card base — PulseSync style */
.glass-card {
  background: var(--bg-glass);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, background 0.2s;
}
.glass-card:hover {
  border-color: var(--line2);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  background: var(--bg-glass2);
}

.section { padding: 4rem 0; }
.divider { border: none; border-top: 1px solid var(--line); }

.sec-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.fade-up { animation: fadeUp 0.5s ease both; }

/* ================================================================
   HERO — centered, PulseSync style
   ================================================================ */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 7rem 2rem 5rem;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--txt2);
  margin-bottom: 2rem;
  background: var(--bg-glass2);
  border: 1px solid var(--line2);
  padding: 5px 14px 5px 10px;
  border-radius: 100px;
  width: fit-content;
}

.hero h1 {
  font-size: clamp(2.6rem, 5.5vw, 5rem);
  font-weight: 900;
  color: var(--txt);
  line-height: 1.04;
  letter-spacing: -0.04em;
  max-width: 720px;
  margin-bottom: 1.4rem;
}
.hero h1 em { font-style: normal; color: var(--y); }

.hero-sub {
  font-size: 1rem;
  color: var(--txt2);
  max-width: 480px;
  line-height: 1.8;
  margin-bottom: 2.2rem;
}

.hero-btns {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 3.5rem;
}

/* Stats card — PulseSync box style */
.hero-stats {
  display: flex;
  border: 1px solid var(--line2);
  border-radius: var(--r-md);
  background: var(--bg-glass2);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.hero-stat {
  padding: 1.1rem 2.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  border-right: 1px solid var(--line2);
}
.hero-stat:last-child { border-right: none; }

.hero-stat-val {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--txt);
  line-height: 1;
  letter-spacing: -0.03em;
}

.hero-stat-lbl {
  font-size: 0.65rem;
  color: var(--txt2);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ================================================================
   SERVICES LIST — PulseSync card style
   ================================================================ */
.services-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-glass);
}

.svc-row {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1.2rem 1.6rem;
  border-bottom: 1px solid var(--line);
  background: transparent;
  transition: background 0.18s, padding-left 0.18s;
  text-decoration: none;
  color: inherit;
}
.svc-row:last-child { border-bottom: none; }
.svc-row:hover { background: var(--bg-glass2); padding-left: 1.9rem; }
.svc-row:hover .svc-arrow { opacity: 1; transform: translateX(0); color: var(--y); }

.svc-n {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--txt3);
  letter-spacing: 0.07em;
  width: 22px;
  flex-shrink: 0;
  font-family: var(--mono);
}

.svc-ico {
  width: 34px; height: 34px;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.18s, border-color 0.18s;
}
.svc-row:hover .svc-ico { background: var(--bg3); border-color: var(--line3); }
.svc-ico svg, .svc-icon-wrap svg { width: 17px; height: 17px; color: #fff; }
.svc-item.featured .svc-icon-wrap svg { color: #fff !important; }

.svc-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--txt);
  flex: 1;
}

.svc-desc-short {
  font-size: 0.78rem;
  color: var(--txt2);
  max-width: 340px;
  flex-shrink: 0;
}

.svc-arrow {
  font-size: 1rem;
  color: var(--txt3);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.18s, transform 0.18s, color 0.18s;
  flex-shrink: 0;
}

.svc-new {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--y);
  color: #000;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
}

/* ================================================================
   PORTFOLIO PREVIEW
   ================================================================ */
.port-preview {
  background: var(--bg1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.prev-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.prev-card {
  background: var(--bg-glass);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: block;
}
.prev-card:hover {
  border-color: var(--line2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.prev-img {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--bg2);
  overflow: hidden;
  position: relative;
}
.prev-img img, .prev-img canvas { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.prev-card:hover .prev-img img, .prev-card:hover .prev-img canvas { transform: scale(1.05); }
.prev-wm-canvas { display: block; }

.prev-ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--txt3);
  font-size: 0.72rem;
}
.prev-ph svg { width: 22px; height: 22px; }

.prev-info { padding: 0.9rem 1rem 1rem; }

.prev-tag {
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--y);
  background: var(--ybg2);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.35rem;
}

.prev-name {
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--txt);
}

/* ================================================================
   CTA STRIP
   ================================================================ */
.cta-strip {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 2.5rem 2.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: var(--bg-glass);
}

.cta-strip h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--txt);
  letter-spacing: -0.025em;
  margin-bottom: 0.3rem;
}

.cta-strip p {
  font-size: 0.85rem;
  color: var(--txt2);
}

/* ================================================================
   SERVICES PAGE
   ================================================================ */
.svc-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.svc-page-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.8rem 1.6rem;
  background: var(--bg-glass);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.svc-page-card:hover {
  border-color: var(--line2);
  background: var(--bg-glass2);
  transform: translateY(-2px);
}

.svc-page-icon {
  width: 44px; height: 44px;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
}
.svc-page-icon svg { width: 20px; height: 20px; color: var(--y); }

.svc-page-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--txt);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.svc-page-desc {
  font-size: 0.82rem;
  color: var(--txt2);
  line-height: 1.75;
  margin-bottom: 1.2rem;
}

.svc-page-price {
  font-size: 0.73rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--y);
  background: var(--ybg);
  border: 1px solid rgba(245,192,0,0.15);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
}

.svc-page-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.8rem;
}

.svc-page-tag {
  font-size: 0.65rem;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--txt3);
  background: var(--bg2);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 5px;
}

/* Category block */
.cat-block { margin-bottom: 3.5rem; }

.cat-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.cat-icon {
  width: 38px; height: 38px;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-icon svg { width: 18px; height: 18px; color: var(--y); }

.cat-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--txt);
  letter-spacing: -0.02em;
}

.cat-desc {
  font-size: 0.8rem;
  color: var(--txt2);
}

/* ================================================================
   PORTFOLIO PAGE
   ================================================================ */
.port-filter-bar {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.port-filter {
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--line2);
  color: var(--txt2);
  cursor: pointer;
  transition: all 0.18s;
}
.port-filter:hover { color: var(--txt); border-color: var(--line3); background: var(--bg-glass2); }
.port-filter.active {
  background: var(--y);
  border-color: var(--y);
  color: #000;
}

.p-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.p-card {
  background: var(--bg-glass);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.p-card:hover {
  border-color: var(--line2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.p-thumb {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--bg2);
  overflow: hidden;
  position: relative;
}
.p-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.p-card:hover .p-thumb img { transform: scale(1.04); }

.p-thumb-ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--txt3);
  font-size: 0.72rem;
}
.p-thumb-ph svg { width: 22px; height: 22px; }

.p-body { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; flex: 1; }

.p-cat {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--y);
  background: var(--ybg2);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.3rem;
  width: fit-content;
}

.p-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--txt);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.p-desc {
  font-size: 0.77rem;
  color: var(--txt2);
  line-height: 1.65;
}

.p-meta-row {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.p-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--txt3);
  background: var(--bg2);
  border: 1px solid var(--line2);
  padding: 2px 7px;
  border-radius: 4px;
}

.port-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  gap: 1rem;
}
.port-empty-icon {
  width: 56px; height: 56px;
  background: var(--bg-glass2);
  border: 1px solid var(--line2);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.port-empty-icon svg { width: 26px; height: 26px; color: var(--txt3); }
.port-empty-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--txt2);
  text-align: center;
}

/* ================================================================
   LIGHTBOX
   ================================================================ */
#lightbox {
  position: fixed; inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
  transition: background 0.28s, backdrop-filter 0.28s;
}
#lightbox.open {
  background: rgba(0,0,0,0.9);
  pointer-events: all;
  backdrop-filter: blur(10px);
}

.lb-inner {
  position: relative;
  max-width: 1000px;
  width: 100%;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.28s, transform 0.28s;
}
#lightbox.open .lb-inner { opacity: 1; transform: scale(1); }

.lb-img-wrap {
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg2);
  border: 1px solid var(--line2);
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  user-select: none;
}
#lb-img { width: 100%; max-height: 82vh; object-fit: contain; display: block; transition: transform 0.08s; transform-origin: center; user-select: none; pointer-events: auto; }

.lb-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding: 0 0.2rem;
}
#lb-title { font-size: 0.9rem; font-weight: 600; color: #fff; }

.lb-close {
  width: 36px; height: 36px;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.lb-close:hover { background: var(--bg3); }
.lb-close svg { width: 16px; height: 16px; color: var(--txt2); }
.lb-backdrop { position: absolute; inset: 0; z-index: -1; }

/* ================================================================
   DETAIL MODAL
   ================================================================ */
#detail-modal {
  position: fixed; inset: 0;
  z-index: 1900;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
  transition: background 0.28s;
}
#detail-modal.open {
  background: rgba(0,0,0,0.88);
  pointer-events: all;
  backdrop-filter: blur(12px);
}

.dm-inner {
  position: relative;
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg1);
  border: 1px solid var(--line2);
  border-radius: var(--r-lg);
  box-shadow: 0 32px 80px rgba(0,0,0,0.7);
  opacity: 0;
  transform: scale(0.94) translateY(12px);
  transition: opacity 0.28s, transform 0.28s;
  scrollbar-width: thin;
}
#detail-modal.open .dm-inner { opacity: 1; transform: none; }

.dm-close {
  position: sticky;
  top: 0; right: 0;
  float: right;
  width: 34px; height: 34px;
  background: var(--bg-glass2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  margin: 1.1rem 1.1rem 0 0;
  z-index: 10;
  flex-shrink: 0;
}
.dm-close:hover { background: var(--bg3); }
.dm-close svg { width: 15px; height: 15px; color: var(--txt2); }

.dm-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  clear: both;
}

.dm-image-col {
  border-right: 1px solid var(--line);
  overflow: hidden;
  border-radius: 0 0 0 var(--r-lg);
}

#dm-image-wrap {
  width: 100%;
  height: 100%;
  min-height: 240px;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
}
#dm-image-wrap img, #dm-image-wrap canvas { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform 0.4s; }
#dm-image-wrap img:hover, #dm-image-wrap canvas:hover { transform: scale(1.04); }

.dm-no-img {
  width: 100%; height: 100%; min-height: 240px;
  display: flex; align-items: center; justify-content: center;
  color: var(--txt3);
}

.dm-info-col {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#dm-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--txt);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

#dm-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }

#dm-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.dm-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--txt);
  background: var(--bg2);
  border: 1px solid var(--line3);
  padding: 4px 10px;
  border-radius: 6px;
}
.dm-badge strong { color: var(--y); }

#dm-desc {
  font-size: 0.85rem;
  color: var(--txt2);
  line-height: 1.75;
}

.dm-feat-title {
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--txt3);
  margin-bottom: 0.5rem;
}

.dm-feat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dm-feat-list li {
  font-size: 0.82rem;
  color: var(--txt2);
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}
.dm-feat-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--y);
  font-size: 0.75rem;
}

.dm-backdrop { position: absolute; inset: 0; z-index: -1; }

/* ================================================================
   CONTACT PAGE
   ================================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 2rem 1.8rem;
  background: var(--bg-glass);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.contact-card:hover {
  border-color: var(--line2);
  background: var(--bg-glass2);
  transform: translateY(-2px);
}

.contact-card-icon {
  width: 46px; height: 46px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-card-icon svg { width: 22px; height: 22px; }

.contact-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--txt);
}
.contact-card-handle {
  font-size: 0.82rem;
  color: var(--txt2);
  font-family: var(--mono);
}
.contact-card-action {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--txt3);
  margin-top: auto;
}

/* ================================================================
   ABOUT PAGE
   ================================================================ */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  font-size: 0.92rem;
  color: var(--txt2);
  line-height: 1.85;
  margin-bottom: 1rem;
}
.about-text p strong { color: var(--txt); }
.about-text a { color: var(--y); text-decoration: none; }
.about-text a:hover { text-decoration: underline; }

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1.4rem;
}

.tech-pill {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--txt2);
  background: var(--bg2);
  border: 1px solid var(--line);
  padding: 3px 11px;
  border-radius: 100px;
  transition: color 0.15s, border-color 0.15s;
}
.tech-pill:hover { color: var(--y); border-color: rgba(245,192,0,0.25); }

.stats-panel {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.stat-block {
  background: var(--bg-glass2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.3rem 1.5rem;
}

.stat-block-val {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--y);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 0.2rem;
}

.stat-block-lbl {
  font-size: 0.75rem;
  color: var(--txt3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 500;
}

.dist-panel {
  background: var(--bg-glass2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.3rem 1.5rem;
}

.dist-title {
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--txt3);
  margin-bottom: 1rem;
}

.dist-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}
.dist-row:last-child { border-bottom: none; }
.dist-lbl { color: var(--txt2); }
.dist-val { color: var(--y); font-weight: 700; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
  .prev-grid    { grid-template-columns: 1fr 1fr; }
  .p-grid       { grid-template-columns: 1fr 1fr; }
  .svc-page-grid { grid-template-columns: 1fr 1fr; }
  .svc-desc-short, .cat-desc { display: none; }
  .foot-inner   { grid-template-columns: 1fr 1fr; }
  .dm-layout    { grid-template-columns: 1fr; }
  .dm-image-col { border-right: none; border-bottom: 1px solid var(--line); border-radius: 0; }
  .about-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .stats-panel  { position: static; flex-direction: row; flex-wrap: wrap; }
  .stat-block   { flex: 1; min-width: 130px; }
  .dist-panel   { width: 100%; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero        { padding: 5rem 1.2rem 3.5rem; }
  .hero-stats  { flex-direction: column; }
  .hero-stat   { border-right: none; border-bottom: 1px solid var(--line2); padding: 0.9rem 2rem; }
  .hero-stat:last-child { border-bottom: none; }
  .prev-grid   { grid-template-columns: 1fr; }
  .p-grid      { grid-template-columns: 1fr; }
  .svc-page-grid { grid-template-columns: 1fr; }
  .cta-strip   { padding: 1.8rem; flex-direction: column; align-items: flex-start; }
  nav          { padding: 0 1.2rem; }
  .nav-links   { display: none; }
  .nav-brand   { flex: 1; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg1);
    border-bottom: 1px solid var(--line);
    padding: 0.6rem; gap: 0.1rem;
    justify-content: flex-start;
    z-index: 900;
  }
  .nav-links.open a { width: 100%; padding: 0.55rem 0.8rem; }
  .burger      { display: flex; }
  .wrap        { padding: 0 1.2rem; }
  footer       { padding: 2.5rem 1.2rem 1.5rem; }
  .foot-inner  { grid-template-columns: 1fr; gap: 2rem; }
  .foot-bottom { flex-direction: column; gap: 0.6rem; text-align: center; }
  .section     { padding: 3rem 0; }
}

/* ================================================================
   ACCENT OVERRIDE — white in dark, black in light
   ================================================================ */
:root {
  --acc:      #ffffff;
  --acc-txt:  #000000;
  --acc-glow: rgba(255,255,255,0.10);
  --acc-hover:#e0e0e0;
}
[data-theme="light"] {
  --acc:      #18181e;
  --acc-txt:  #ffffff;
  --acc-glow: rgba(0,0,0,0.10);
  --acc-hover:#333340;
}

/* Override yellow buttons → accent (white/black) */
.btn-y {
  background: var(--acc) !important;
  color: var(--acc-txt) !important;
  box-shadow: 0 4px 16px var(--acc-glow) !important;
}
.btn-y:hover {
  background: var(--acc-hover) !important;
  color: var(--acc-txt) !important;
}

.nav-cta {
  background: var(--acc) !important;
  color: var(--acc-txt) !important;
}
.nav-cta:hover {
  background: var(--acc-hover) !important;
  color: var(--acc-txt) !important;
}

/* ================================================================
   STARS — black in light theme
   ================================================================ */
[data-theme="light"] #stars-canvas { opacity: 0.35; }

/* ================================================================
   PORTFOLIO CATEGORIES GRID — was completely missing
   ================================================================ */
.port-hero {
  padding: 3rem 0 2.2rem;
  text-align: left;
}
.port-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  color: var(--txt);
  margin-bottom: 0.4rem;
  line-height: 1.1;
}
.port-hero h1 em { font-style: normal; color: var(--y); }
.port-hero p {
  font-size: 0.88rem;
  color: var(--txt2);
}

.categories-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-glass);
}

.cat-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.15rem 1.5rem;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s, padding-left 0.18s;
  color: var(--txt);
  font-family: inherit;
  position: relative;
  overflow: hidden;
}
.cat-card:last-child { border-bottom: none; }
.cat-card:hover {
  background: var(--bg-glass2);
  padding-left: 1.85rem;
}
.cat-card:hover .cat-arrow { opacity: 1; transform: translateX(0); color: var(--y); }
.cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.015) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
}
.cat-card:hover::before { opacity: 1; }

.cat-n {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--txt3);
  letter-spacing: 0.07em;
  width: 20px;
  flex-shrink: 0;
  font-family: var(--mono);
}

.cat-ico {
  width: 36px; height: 36px;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.18s, border-color 0.18s;
}
.cat-card:hover .cat-ico { background: var(--bg3); border-color: var(--line3); }
.cat-ico svg { width: 18px; height: 18px; color: var(--y); }

.cat-info { flex: 1; min-width: 0; }
.cat-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--txt);
  margin-bottom: 0.1rem;
}
.cat-desc {
  font-size: 0.75rem;
  color: var(--txt2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-count {
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--txt3);
  background: var(--bg2);
  border: 1px solid var(--line2);
  padding: 3px 10px;
  border-radius: 6px;
  flex-shrink: 0;
}
.cat-count--empty { opacity: 0.55; }

.cat-arrow {
  font-size: 1rem;
  color: var(--txt3);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.18s, transform 0.18s, color 0.18s;
  flex-shrink: 0;
}

/* ── Back nav + category title ─────────────────────────────────── */
.port-cat-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 2rem 0 1.4rem;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.4rem 0.9rem;
  background: var(--bg-glass2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--txt2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: inherit;
  flex-shrink: 0;
}
.back-btn:hover { background: var(--bg2); color: var(--txt); border-color: var(--line3); }
.back-btn svg { width: 14px; height: 14px; }
.port-cat-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--txt);
  letter-spacing: -0.025em;
}

/* ── Filters ───────────────────────────────────────────────────── */
.filters {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}
.f-btn {
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--line2);
  color: var(--txt2);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.f-btn:hover { color: var(--txt); border-color: var(--line3); background: var(--bg-glass2); }
.f-btn.active {
  background: var(--acc);
  border-color: var(--acc);
  color: var(--acc-txt);
}

/* ================================================================
   PORTFOLIO ITEM CARDS — JS generates these class names
   ================================================================ */
/* alias p-img → p-thumb */
.p-img {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--bg2);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.p-img img, .p-img canvas { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.p-card:hover .p-img img, .p-card:hover .p-img canvas { transform: scale(1.04); }
.p-img.no-img img, .p-img.no-img canvas { display: none; }

.p-img::before {
  content: none;
}

.dm-canvas-img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  border-radius: 8px;
}

#lb-canvas {
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
}

/* shimmer on hover */
.p-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 3;
}
.p-card:hover .p-img::after { opacity: 1; }

.p-img-ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--txt3);
  font-size: 0.72rem;
  opacity: 0;
}
.p-img.no-img .p-img-ph { opacity: 1; }

.p-img-zoom {
  position: absolute;
  bottom: 8px; right: 8px;
  width: 28px; height: 28px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s, transform 0.2s;
}
.p-card:hover .p-img-zoom { opacity: 1; transform: scale(1); }
.p-img-zoom svg { width: 14px; height: 14px; color: #fff; }

.p-detail-hint {
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  border-radius: 100px;
  font-size: 0.66rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
  pointer-events: none;
}
.p-card--detail:hover .p-detail-hint { opacity: 1; }

/* alias p-info → p-body */
.p-info { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; flex: 1; }

.p-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.35rem; }

.p-tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--y);
  background: var(--ybg2);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* ================================================================
   CARD GLOW — shimmer like on avatar circles in screenshot 2
   ================================================================ */
.prev-card, .glass-card, .p-card {
  position: relative;
}
.prev-card::before, .glass-card::before, .p-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
  border-radius: var(--r-md) var(--r-md) 0 0;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 1;
}
.prev-card:hover::before, .glass-card:hover::before, .p-card:hover::before { opacity: 1; }

/* Glow on card hover (subtle, not yellow) */
.p-card:hover, .prev-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.07) !important;
}
[data-theme="light"] .p-card:hover, [data-theme="light"] .prev-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.08) !important;
}

/* ================================================================
   FILTER BAR — port-filter active also uses accent
   ================================================================ */
.port-filter.active {
  background: var(--acc) !important;
  border-color: var(--acc) !important;
  color: var(--acc-txt) !important;
}

/* ================================================================
   LIGHT THEME — make star-like particles dark
   ================================================================ */
[data-theme="light"] .hero-label,
[data-theme="light"] .nav-links a.active,
[data-theme="light"] .stats-panel .stat-block-val { color: var(--txt); }

/* ================================================================
   RESPONSIVE — categories
   ================================================================ */
@media (max-width: 640px) {
  .cat-desc { display: none; }
  .cat-card { padding: 1rem 1.2rem; }
}

/* ================================================================
   GLOBAL YELLOW → WHITE/BLACK OVERRIDE
   Completely replaces yellow accent with white (dark) / black (light)
   ================================================================ */
:root {
  --y:      #ffffff;
  --y2:     #dddddd;
  --ybg:    rgba(255,255,255,0.04);
  --ybg2:   rgba(255,255,255,0.08);
  --y-glow: rgba(255,255,255,0.08);
  --shadow-hover: 0 8px 28px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.08);
}
[data-theme="light"] {
  --y:      #18181e;
  --y2:     #333340;
  --ybg:    rgba(0,0,0,0.05);
  --ybg2:   rgba(0,0,0,0.09);
  --y-glow: rgba(0,0,0,0.08);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.13), 0 0 0 1px rgba(0,0,0,0.08);
}

/* Fix hardcoded yellow rgba values */
.theme-toggle:hover { border-color: rgba(255,255,255,0.18) !important; }
[data-theme="light"] .theme-toggle:hover { border-color: rgba(0,0,0,0.20) !important; }
.foot-soc a:hover { border-color: rgba(255,255,255,0.3) !important; }
[data-theme="light"] .foot-soc a:hover { border-color: rgba(0,0,0,0.3) !important; }
.foot-theme-btn:hover { border-color: rgba(255,255,255,0.18) !important; }
[data-theme="light"] .foot-theme-btn:hover { border-color: rgba(0,0,0,0.20) !important; }
.tech-pill:hover { border-color: rgba(255,255,255,0.18) !important; }
[data-theme="light"] .tech-pill:hover { border-color: rgba(0,0,0,0.20) !important; }

/* Tag: keep subtle, no yellow bg */
.tag {
  color: var(--txt) !important;
  background: var(--bg-glass2) !important;
  border-color: var(--line2) !important;
}

/* svc-new badge: was yellow pill */
.svc-new {
  background: var(--txt) !important;
  color: var(--bg) !important;
}

/* Price badge on services page */
.svc-page-price {
  color: var(--txt) !important;
  background: var(--bg2) !important;
  border-color: var(--line2) !important;
}

/* dm-badge strong — was yellow value */
.dm-badge strong { color: var(--txt) !important; }

/* dist-val — was yellow */
.dist-val { color: var(--txt) !important; }

/* stat-block-val on about page — was yellow */
.stat-block-val { color: var(--txt) !important; }

/* about-text links */
.about-text a { color: var(--txt) !important; text-decoration: underline; text-underline-offset: 3px; }

/* ================================================================
   PORTFOLIO PREVIEW — atmospheric background
   ================================================================ */
.port-preview {
  background: var(--bg1) !important;
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate;
}

/* Grid dot pattern */
.port-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: 16px 16px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 30%, transparent 100%);
}
[data-theme="light"] .port-preview::before {
  background-image: radial-gradient(circle, rgba(0,0,0,0.09) 1px, transparent 1px);
}

/* Ambient glow blob — top-right */
.port-preview::after {
  content: '';
  position: absolute;
  width: 600px; height: 400px;
  top: -80px; right: -100px;
  background: radial-gradient(ellipse at center,
    rgba(255,255,255,0.035) 0%,
    rgba(255,255,255,0.01) 50%,
    transparent 70%);
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
}
[data-theme="light"] .port-preview::after {
  background: radial-gradient(ellipse at center,
    rgba(0,0,0,0.04) 0%,
    transparent 70%);
}

/* Keep content above pseudo elements */
.port-preview .wrap { position: relative; z-index: 1; }

/* Vignette fade on sides */
.port-preview .prev-grid {
  position: relative;
}

/* Brand icon — was yellow square */
.nav-brand-icon {
  background: var(--txt) !important;
  color: var(--bg) !important;
}
.foot-brand-icon {
  background: var(--txt) !important;
  color: var(--bg) !important;
}
.foot-brand span { color: var(--txt) !important; }

/* Accent circle on favicon dot — keep yellow only there */

/* Port filter active — already uses --acc (white/black), fine */

/* Remove yellow glow from btn-y */
.btn-y {
  box-shadow: 0 4px 16px rgba(255,255,255,0.06) !important;
}
[data-theme="light"] .btn-y {
  box-shadow: 0 4px 16px rgba(0,0,0,0.10) !important;
}

/* prev-tag (карты и постройки label on cards) */
.prev-tag {
  color: var(--txt2) !important;
  background: var(--bg2) !important;
  font-weight: 600;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* p-tag (category label on portfolio cards) */
.p-tag {
  color: var(--txt2) !important;
  background: var(--bg2) !important;
}

/* ================================================================
   ALL BUTTONS → WHITE (dark theme) / BLACK (light theme)
   Override brand-colored buttons: Discord, Telegram, FunPay
   ================================================================ */

/* Base: unified accent button appearance */
.btn-dc,
.btn-tg,
.btn-fp,
.btn-y {
  background: var(--acc) !important;
  color: var(--acc-txt) !important;
  box-shadow: 0 2px 10px var(--acc-glow) !important;
}

.btn-dc:hover,
.btn-tg:hover,
.btn-fp:hover,
.btn-y:hover {
  background: var(--acc-hover) !important;
  color: var(--acc-txt) !important;
  transform: translateY(-1px);
}

/* Ghost button — neutral, but also adapt to theme */
.btn-ghost {
  background: transparent !important;
  color: var(--txt2) !important;
  border: 1px solid var(--line2) !important;
}
.btn-ghost:hover {
  background: var(--bg-glass2) !important;
  color: var(--txt) !important;
  border-color: var(--line3) !important;
}

/* Nav CTA */
.nav-cta,
.nav-cta:hover {
  background: var(--acc) !important;
  color: var(--acc-txt) !important;
}
.nav-cta:hover { background: var(--acc-hover) !important; }

/* Social icons in buttons — keep visible on white/black bg */
.btn-dc svg,
.btn-tg svg,
.btn-fp svg,
.btn-y svg {
  color: var(--acc-txt) !important;
  opacity: 0.75;
}

/* Light theme — make sure --acc-txt is white on dark bg */
[data-theme="light"] .btn-dc,
[data-theme="light"] .btn-tg,
[data-theme="light"] .btn-fp,
[data-theme="light"] .btn-y {
  background: var(--acc) !important;      /* #18181e */
  color: var(--acc-txt) !important;       /* #ffffff */
}
[data-theme="light"] .btn-dc:hover,
[data-theme="light"] .btn-tg:hover,
[data-theme="light"] .btn-fp:hover,
[data-theme="light"] .btn-y:hover {
  background: var(--acc-hover) !important;
}

/* ================================================================
   FINAL FIXES
   ================================================================ */

/* 1. Hide Tz square icon everywhere (nav + footer) */
.nav-brand-icon,
.foot-brand-icon {
  display: none !important;
}

/* 2. svc-new "Основное" badge — explicit white/black, no yellow */
.svc-new {
  background: var(--txt) !important;
  color: var(--bg) !important;
  border-radius: 4px !important;
  font-size: 0.56rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  padding: 2px 7px !important;
}

/* 3. Stars in light theme — visible dark dots */
[data-theme="light"] #stars-canvas {
  opacity: 0.6 !important;
}

/* Also fix any other hardcoded yellow that might remain */
/* nav-brand text colour */
.nav-brand { color: var(--txt) !important; }

/* footer brand */
.foot-brand { color: var(--txt) !important; }

/* hero h1 em / sec-title em — accent yellow, no italic */
.hero h1 em,
.sec-title em,
.port-hero h1 em {
  color: var(--y) !important;
  font-style: normal !important;
}

.svc-item.featured .svc-icon-wrap svg,
.svc-item.featured .svc-icon-wrap svg * {
  stroke: #fff !important;
  fill: none !important;
  color: #fff !important;
}

.cs-case-outer {
  position: relative;
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
}
.cs-case-pointer {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: var(--y);
  z-index: 10;
  pointer-events: none;
}
.cs-case-pointer::before {
  content: '';
  position: absolute;
  top: -2px; left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: var(--y);
  border-top-width: 12px;
  margin-top: -12px;
}
.cs-case-pointer::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-bottom-color: var(--y);
  border-bottom-width: 12px;
  margin-bottom: -12px;
}
.cs-case-viewport {
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.4);
}
.cs-case-track {
  display: flex;
  gap: 4px;
  padding: 8px 4px;
  will-change: transform;
  user-select: none;
}
.cs-item {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 8px;
  border: 1px solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  padding: 8px;
  position: relative;
  overflow: hidden;
}
.cs-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%);
  pointer-events: none;
}
.cs-item--nothing { background: #0e0e0e; border-color: #222; color: #3a3a3a; }
.cs-item--blue    { background: #07122a; border-color: #1d4ed8; color: #60a5fa; }
.cs-item--purple  { background: #130a2a; border-color: #7c3aed; color: #a78bfa; }
.cs-item--pink    { background: #200a2a; border-color: #a21caf; color: #e879f9; }
.cs-item--red     { background: #220a0a; border-color: #dc2626; color: #f87171; }
.cs-item--orange  { background: #221000; border-color: #ea580c; color: #fb923c; }
.cs-item--gold    { background: #1a1000; border-color: rgba(245,192,0,0.6); color: #f5c000; }

.cs-item-val {
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}
.cs-item--nothing .cs-item-val { font-size: 1.8rem; opacity: 0.15; }
.cs-item-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.55;
}

.cs-spin-btn {
  display: block;
  margin: 1.4rem auto 0;
  background: var(--y);
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 3rem;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: opacity 0.18s, transform 0.1s;
}
.cs-spin-btn:hover  { opacity: 0.87; transform: translateY(-1px); }
.cs-spin-btn:disabled { opacity: 0.4; cursor: default; transform: none; }

.cs-result {
  margin-top: 1.2rem;
  padding: 1rem 1.4rem;
  border-radius: 10px;
  text-align: center;
  display: none;
}
.cs-result.show { display: block; }
.cs-result--win {
  background: rgba(245,192,0,0.08);
  border: 1px solid rgba(245,192,0,0.25);
}
.cs-result--lose {
  background: var(--bg2);
  border: 1px solid var(--line);
}
.cs-result-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.cs-result--win .cs-result-title { color: var(--y); }
.cs-result--lose .cs-result-title { color: var(--txt3); }
.cs-coupon-key {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--y);
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(245,192,0,0.2);
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  letter-spacing: 0.08em;
  display: inline-block;
  margin: 0.4rem 0;
  cursor: pointer;
}
.cs-coupon-key:hover { background: rgba(245,192,0,0.1); }
.cs-result-hint { font-size: 0.72rem; color: var(--txt3); margin-top: 0.4rem; }

.cs-note { font-size: 0.7rem; color: var(--txt3); text-align: center; margin-top: 0.8rem; opacity: 0.6; }
.cs-cooldown { text-align: center; padding: 1.2rem 0; font-size: 0.85rem; color: var(--txt3); }

/* Цветные аватары */
.color-avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  margin: 0 auto;
  flex-shrink: 0;
}
.color-avatar-sm {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

/* Купоны в профиле */
.coupon-list { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.5rem; }
.coupon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  flex-wrap: wrap;
}
.coupon-row.used { opacity: 0.45; }
.coupon-row-left { display: flex; align-items: center; gap: 0.8rem; }
.coupon-discount { font-size: 1.1rem; font-weight: 800; color: var(--y); min-width: 42px; }
.coupon-key-text { font-family: 'Courier New', monospace; font-size: 0.82rem; color: var(--txt2); }
.coupon-used-badge {
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  background: #222; color: #555; border-radius: 4px; padding: 2px 7px;
}
.coupon-active-badge {
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  background: rgba(245,192,0,0.12); color: var(--y); border-radius: 4px; padding: 2px 7px;
}
