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

/* === LOADER === */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
  pointer-events: none;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-dot {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--text-primary);
  animation: loaderPulse 1s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* === DESIGN TOKENS === */
:root {
  /* Colors — Dark (default) */
  --bg: oklch(0.10 0 0);
  --surface: oklch(0.14 0 0);
  --surface-2: oklch(0.18 0 0);
  --border: oklch(0.22 0 0);
  --text-primary: oklch(0.97 0 0);
  --text-secondary: oklch(0.55 0 0);
  --accent: oklch(0.97 0 0);
  --accent-hover: oklch(0.85 0 0);
  --accent-subtle: oklch(0.97 0 0 / 0.08);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Type Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 3rem;
  --text-5xl: clamp(3rem, 8vw, 6rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 64px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.25);
  --shadow-lg: 0 20px 40px oklch(0 0 0 / 0.3);
  --shadow-accent: 0 0 0 3px var(--accent-subtle);

  color-scheme: dark;
}

/* === LIGHT THEME === */
[data-theme="light"] {
  --bg: oklch(0.97 0 0);
  --surface: oklch(0.93 0 0);
  --surface-2: oklch(0.88 0 0);
  --border: oklch(0.82 0 0);
  --text-primary: oklch(0.10 0 0);
  --text-secondary: oklch(0.45 0 0);
  --accent: oklch(0.10 0 0);
  --accent-hover: oklch(0.25 0 0);
  --accent-subtle: oklch(0.10 0 0 / 0.06);
  color-scheme: light;
}

[data-theme="light"] body {
  background: var(--bg);
  color: var(--text-primary);
}

[data-theme="light"] ::selection {
  background: var(--text-primary);
  color: var(--bg);
}

[data-theme="light"] ::-webkit-scrollbar-thumb { background: var(--border); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

[data-theme="light"] .hero-content::before { background: oklch(0.97 0 0 / 0.75); }
[data-theme="light"] .about,
[data-theme="light"] .cases,
[data-theme="light"] .services,
[data-theme="light"] .process,
[data-theme="light"] .contact { background: oklch(0.97 0 0 / 0.8); }
[data-theme="light"] .footer { background: oklch(0.97 0 0 / 0.9); }
[data-theme="light"] .case-card,
[data-theme="light"] .service-card { background: oklch(0.93 0 0 / 0.7); border-color: oklch(0 0 0 / 0.06); }
[data-theme="light"] .form-input,
[data-theme="light"] .form-textarea { background: oklch(0.97 0 0 / 0.6); border-color: oklch(0 0 0 / 0.1); }
[data-theme="light"] .nav { background: oklch(0.97 0 0 / 0.6); }
[data-theme="light"] .stat-card { background: oklch(0.93 0 0 / 0.6); border-color: oklch(0 0 0 / 0.06); }
[data-theme="light"] .case-modal-content { background: oklch(0.93 0 0 / 0.85); border-color: oklch(0 0 0 / 0.08); }
[data-theme="light"] .nav-mobile { background: oklch(0.97 0 0 / 0.9); }
[data-theme="light"] .skill-tag { background: oklch(0.97 0 0 / 0.5); border-color: oklch(0 0 0 / 0.08); }
[data-theme="light"] .process-step-number { background: oklch(0.97 0 0 / 0.6); }

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* === ACCESSIBILITY === */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: var(--text-5xl); letter-spacing: -0.04em; }
h2 { font-size: var(--text-4xl); letter-spacing: -0.03em; }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p {
  text-wrap: pretty;
}

.label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* === LAYOUT === */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-32) 0;
  margin: 0;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* === ANIMATIONS === */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

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

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* === NAVIGATION === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-8);
  background: color-mix(in oklch, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out);
}

.nav.scrolled {
  background: color-mix(in oklch, var(--bg) 95%, transparent);
  border-bottom-color: var(--border);
}

.nav-logo {
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: var(--space-8);
  list-style: none;
}

.nav-links a {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  transition: color var(--duration-fast) var(--ease-out);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text-primary);
  transition: width var(--duration-normal) var(--ease-out);
}

.nav-links a:hover {
  color: var(--text-primary);
}

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

@media (max-width: 768px) {
  .nav { padding: 0 var(--space-4); }
  .nav-links { display: none; }
}

/* === HERO === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
}

.hero-glow {
  position: absolute;
  top: 20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-subtle) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-label {
  margin-bottom: var(--space-6);
}

.hero-title {
  font-size: var(--text-5xl);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-6);
}

.hero-title-accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: var(--text-lg);
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: var(--space-8);
}

.hero-cta {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  border-radius: var(--radius-md);
  transition: background var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: scale(0.96);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  background: transparent;
  color: var(--text-primary);
  font-weight: 500;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  background: oklch(0.95 0 0 / 0.05);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:active {
  transform: scale(0.96);
}

.hero-scroll {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-secondary), transparent);
}

@media (max-width: 768px) {
  .hero-title { font-size: clamp(2.5rem, 12vw, 4rem); }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .hero-scroll { display: none; }
}

/* === ABOUT === */

.section-header {
  margin-bottom: var(--space-16);
}

.section-header .label {
  margin-bottom: var(--space-4);
}

.section-header h2 {
  margin-top: var(--space-3);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-16);
  align-items: center;
}

.about-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--bg);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.about-image:hover img {
  transform: scale(1.03);
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.about-name {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.about-bio {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.7;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  padding: var(--space-8) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat-number {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-top: var(--space-2);
}

.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-3);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }
  .stat-number { font-size: var(--text-2xl); }
}

/* === CASES === */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: var(--space-6);
}

.case-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
  border: 1px solid var(--border);
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--text-secondary);
}

.case-card-image {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--surface-2);
}

.case-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(80%);
  transition: filter var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.case-card-image img[src*="data:"] {
  object-fit: contain;
}

@media (min-width: 768px) {
  .case-card-image img:not([src*="data:"]) {
    object-fit: cover;
  }
}

.case-card:hover .case-card-image img {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.case-card-body {
  padding: var(--space-6);
}

.case-card-category {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.case-card-title {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
}

.case-card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* === CASE MODAL === */
.case-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.case-modal.active { display: flex; }

.case-modal-overlay {
  position: absolute;
  inset: 0;
  background: oklch(0.13 0 0 / 0.9);
  backdrop-filter: blur(12px);
}

.case-modal-content {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn var(--duration-normal) var(--ease-out);
}

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

.case-modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 40px;
  height: 40px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1.25rem;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--duration-fast);
}

.case-modal-close:hover {
  border-color: var(--accent);
}

.case-modal-image {
  width: 100%;
  max-height: 60vh;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--surface-2);
}

.case-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.case-modal-body {
  padding: var(--space-8);
}

.case-modal-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.case-modal-desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-wrap;
}

@media (max-width: 768px) {
  .cases-grid {
    grid-template-columns: 1fr;
  }
}

/* === CONTACT === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-16);
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.contact-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--surface);
}

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

.contact-heading {
  font-size: var(--text-4xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.contact-tg-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 500;
  transition: all var(--duration-fast) var(--ease-out);
}

.contact-tg-link:hover {
  border-color: var(--text-secondary);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.contact-tg-link svg {
  flex-shrink: 0;
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: border-color var(--duration-fast),
              box-shadow var(--duration-fast);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-secondary);
}

.form-input:focus-visible,
.form-textarea:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}

.form-input:focus:not(:focus-visible),
.form-textarea:focus:not(:focus-visible) {
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}

.form-file {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-4);
  cursor: pointer;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  transition: border-color var(--duration-fast), background var(--duration-fast);
}

.form-file:hover {
  border-color: var(--text-secondary);
  background: var(--surface-2);
}

.form-file input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.form-file::before {
  content: 'Выбрать файл';
  font-weight: 500;
  color: var(--text-primary);
}

.file-hint {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.form-submit {
  padding: 14px var(--space-8);
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.03em;
  border-radius: var(--radius-md);
  transition: background var(--duration-fast),
              transform var(--duration-fast),
              box-shadow var(--duration-fast);
  margin-top: var(--space-2);
}

.form-submit:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-md);
}

.form-submit:active {
  transform: scale(0.96);
}

.form-submit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }
  .contact-heading { font-size: var(--text-3xl); }
}

/* === FOOTER === */
.footer {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: var(--space-6);
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color var(--duration-fast);
}

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

/* Easter egg / · */
.easter-egg {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-secondary);
  opacity: 0;
  cursor: default;
  user-select: none;
  transition: opacity 0.6s var(--ease-out), color 0.3s;
  z-index: 1;
  letter-spacing: 4px;
}

.easter-egg:hover {
  color: var(--text-primary);
  opacity: 1 !important;
}

body:has(.footer:hover) .easter-egg {
  opacity: 0.3;
}

@media (max-width: 768px) {
  .easter-egg { display: none; }
}

/* === MOBILE MENU === */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  padding: 4px 0;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--duration-normal) var(--ease-out),
              opacity var(--duration-normal);
}

.nav-toggle.active span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle.active span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--nav-height);
  background: var(--bg);
  z-index: 999;
  padding: var(--space-8);
  flex-direction: column;
  gap: var(--space-6);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
}

.nav-mobile.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.nav-mobile a {
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--text-primary);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
}

/* === LOAD SEQUENCE === */
.hero-label,
.hero-title,
.hero-subtitle,
.hero-cta {
  opacity: 0;
  transform: translateY(20px);
}

.hero.loaded .hero-label {
  animation: fadeUp 0.6s var(--ease-out) 0.1s forwards;
}

.hero.loaded .hero-title {
  animation: fadeUp 0.6s var(--ease-out) 0.25s forwards;
}

.hero.loaded .hero-subtitle {
  animation: fadeUp 0.6s var(--ease-out) 0.4s forwards;
}

.hero.loaded .hero-cta {
  animation: fadeUp 0.6s var(--ease-out) 0.55s forwards;
}

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

@media (prefers-reduced-motion: reduce) {
  .hero-label,
  .hero-title,
  .hero-subtitle,
  .hero-cta {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* === SHINING TEXT === */
.shine-text {
  background: linear-gradient(
    120deg,
    var(--text-primary) 0%,
    var(--text-primary) 40%,
    oklch(0.7 0 0) 50%,
    var(--text-primary) 60%,
    var(--text-primary) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* === MARQUEE === */
.marquee-section {
  padding: var(--space-12) 0;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 25s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-8);
  white-space: nowrap;
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  transition: color var(--duration-fast);
}

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

.marquee-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-secondary);
  opacity: 0.5;
  flex-shrink: 0;
}

/* === SPOTLIGHT CARD === */
.spotlight-card {
  position: relative;
  overflow: hidden;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    var(--accent-subtle),
    transparent 40%
  );
  opacity: 0;
  transition: opacity var(--duration-normal);
  pointer-events: none;
  z-index: 0;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card > * {
  position: relative;
  z-index: 1;
}

/* === GLOW BUTTON === */
.glow-btn {
  position: relative;
  overflow: visible;
}

.glow-btn::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), oklch(0.72 0.19 250), var(--accent));
  opacity: 0;
  z-index: -1;
  filter: blur(12px);
  transition: opacity var(--duration-normal);
}

.glow-btn:hover::after {
  opacity: 0.6;
}

/* === TEXT SCRAMBLE === */
.scramble-text {
  display: inline-block;
}

/* === PULSING BORDER === */
.pulse-border {
  position: relative;
}

.pulse-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    var(--pulse-angle, 0deg),
    transparent 0%,
    var(--accent) 50%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: pulseRotate 3s linear infinite;
  opacity: 0.6;
}

@keyframes pulseRotate {
  0% { --pulse-angle: 0deg; }
  100% { --pulse-angle: 360deg; }
}

@property --pulse-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* === COUNTER ANIMATION === */
.count-up {
  font-variant-numeric: tabular-nums;
}

/* === FLOATING ORB === */
.floating-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.1); }
}

/* === MORPHING BLOB === */
.morph-blob {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: var(--accent-subtle);
  filter: blur(40px);
  animation: morph 12s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes morph {
  0% { border-radius: 50% 40% 60% 50% / 50% 60% 40% 50%; transform: rotate(0deg) scale(1); }
  33% { border-radius: 40% 60% 50% 50% / 60% 40% 50% 50%; transform: rotate(120deg) scale(1.05); }
  66% { border-radius: 50% 50% 40% 60% / 40% 50% 60% 50%; transform: rotate(240deg) scale(0.95); }
  100% { border-radius: 60% 40% 50% 50% / 50% 50% 40% 60%; transform: rotate(360deg) scale(1); }
}

/* === ROTATING GEOMETRIC SHAPES === */
.geo-rotate {
  position: absolute;
  pointer-events: none;
  opacity: 0.1;
}

.geo-rotate svg {
  animation: geoSpin 20s linear infinite;
}

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

.geo-rotate--reverse svg {
  animation-direction: reverse;
  animation-duration: 30s;
}

/* === GRADIENT BORDER === */
.gradient-border {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    var(--gradient-angle, 0deg),
    var(--text-primary),
    transparent 40%,
    transparent 60%,
    var(--text-primary)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotateGradient 4s linear infinite;
}

@property --gradient-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes rotateGradient {
  to { --gradient-angle: 360deg; }
}

/* === RIPPLE CLICK === */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, var(--text-primary) 10%, transparent 10%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.5s, opacity 0.5s;
}

.ripple:active::after {
  transform: scale(0, 0);
  opacity: 0.08;
  transition: 0s;
}

/* === NOISE TEXTURE OVERLAY === */
.noise-overlay::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* === THEME TOGGLE === */
.theme-toggle {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--text-primary);
  border: none;
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  transition: all var(--duration-normal) var(--ease-out);
  box-shadow: 0 4px 12px oklch(0 0 0 / 0.2);
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px oklch(0 0 0 / 0.25);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform var(--duration-normal) var(--ease-out);
}

.theme-toggle:hover svg {
  transform: rotate(30deg);
}

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

[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

/* === FLOATING PARTICLES === */
.particles-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  10% { opacity: 0.3; }
  90% { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

/* === WAVE BACKGROUND === */
.waves-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* === WAVES EVERYWHERE + READABLE === */
.hero-content {
  position: relative;
  z-index: 1;
}

.hero-content::before {
  content: '';
  position: absolute;
  inset: -60px -80px;
  background: oklch(0.10 0 0 / 0.85);
  border-radius: var(--radius-lg);
  z-index: -1;
  pointer-events: none;
}

/* Sections: dim waves behind content, waves still visible */
.about, .cases, .services, .process, .contact {
  position: relative;
  z-index: 1;
  background: oklch(0.10 0 0 / 0.55);
}

.footer {
  position: relative;
  z-index: 1;
  background: oklch(0.10 0 0 / 0.8);
}

/* Nav: readable over waves */
.nav {
  background: oklch(0.10 0 0 / 0.85);
}

.nav-mobile {
  background: oklch(0.10 0 0 / 0.95);
}

/* Cards: solid enough to read */
.case-card, .service-card {
  background: oklch(0.14 0 0 / 0.92);
  border: 1px solid oklch(1 0 0 / 0.08);
}

.form-input, .form-textarea {
  background: oklch(0.10 0 0 / 0.8);
  border: 1px solid oklch(1 0 0 / 0.1);
}

.stat-card {
  background: oklch(0.14 0 0 / 0.85);
  border: 1px solid oklch(1 0 0 / 0.06);
}

.case-modal-content {
  background: oklch(0.14 0 0 / 0.97);
  border: 1px solid oklch(1 0 0 / 0.08);
}

.skill-tag {
  background: oklch(0.10 0 0 / 0.75);
  border: 1px solid oklch(1 0 0 / 0.08);
}

.process-step-number {
  background: oklch(0.10 0 0 / 0.85);
  border: 1px solid oklch(1 0 0 / 0.1);
}

.form-submit {
  background: var(--text-primary);
  color: var(--bg);
}

/* Light theme */
[data-theme="light"] .hero-content::before { background: oklch(0.97 0 0 / 0.85); }
[data-theme="light"] .about, [data-theme="light"] .cases,
[data-theme="light"] .services, [data-theme="light"] .process,
[data-theme="light"] .contact { background: oklch(0.97 0 0 / 0.55); }
[data-theme="light"] .footer { background: oklch(0.97 0 0 / 0.8); }
[data-theme="light"] .nav { background: oklch(0.97 0 0 / 0.85); }
[data-theme="light"] .nav-mobile { background: oklch(0.97 0 0 / 0.95); }
[data-theme="light"] .case-card, [data-theme="light"] .service-card { background: oklch(0.93 0 0 / 0.92); border-color: oklch(0 0 0 / 0.06); }
[data-theme="light"] .form-input, [data-theme="light"] .form-textarea { background: oklch(0.97 0 0 / 0.8); border-color: oklch(0 0 0 / 0.1); }
[data-theme="light"] .stat-card { background: oklch(0.93 0 0 / 0.85); border-color: oklch(0 0 0 / 0.06); }
[data-theme="light"] .case-modal-content { background: oklch(0.93 0 0 / 0.97); border-color: oklch(0 0 0 / 0.08); }
[data-theme="light"] .skill-tag { background: oklch(0.97 0 0 / 0.75); border-color: oklch(0 0 0 / 0.08); }
[data-theme="light"] .process-step-number { background: oklch(0.97 0 0 / 0.85); border-color: oklch(0 0 0 / 0.1); }
[data-theme="light"] .form-submit { background: var(--text-primary); color: var(--bg); }

/* === MAGNETIC BUTTON === */
.magnetic {
  transition: transform 0.3s var(--ease-out);
}

/* === TILT CARD === */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.tilt-card .tilt-inner {
  transition: transform 0.1s var(--ease-out);
  transform-style: preserve-3d;
}

/* === TEXT REVEAL ON SCROLL === */
.reveal-text {
  overflow: hidden;
}

.reveal-text > * {
  transform: translateY(110%);
  transition: transform 0.8s var(--ease-out);
}

.reveal-text.visible > * {
  transform: translateY(0);
}

/* === ANIMATED UNDERLINE === */
.underline-anim {
  position: relative;
  display: inline-block;
}

.underline-anim::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--text-primary);
  transition: width 0.4s var(--ease-out);
}

.underline-anim:hover::after {
  width: 100%;
}

/* === STAGGER CHILDREN === */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 80ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 160ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 240ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 320ms; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 400ms; opacity: 1; transform: translateY(0); }

/* === PARALLAX LAYER === */
[data-parallax] {
  will-change: transform;
}

/* === GLOW PULSE === */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px oklch(0.97 0 0 / 0.05); }
  50% { box-shadow: 0 0 40px oklch(0.97 0 0 / 0.12); }
}

.glow-pulse {
  animation: glowPulse 3s ease-in-out infinite;
}

/* === BORDER DASH ANIMATED === */
.border-dash-anim {
  position: relative;
}

.border-dash-anim::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px dashed var(--border);
  border-radius: inherit;
  animation: dashRotate 20s linear infinite;
}

@keyframes dashRotate {
  to { border-color: var(--text-secondary); }
}

/* === HOVER LIFT + SCALE === */
.hover-pop {
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.hover-pop:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 60px oklch(0 0 0 / 0.2);
}

/* === TYPING CURSOR === */
.typing-cursor::after {
  content: '|';
  animation: blink 0.8s step-end infinite;
  color: var(--text-primary);
  font-weight: 300;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* === WAVE TEXT === */
.wave-text span {
  display: inline-block;
  animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* === GLITCH TEXT === */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch:hover::before {
  animation: glitch1 0.3s linear infinite;
  color: var(--text-secondary);
  opacity: 0.8;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.glitch:hover::after {
  animation: glitch2 0.3s linear infinite;
  color: var(--text-secondary);
  opacity: 0.8;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitch1 {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-2px, -1px); }
  80% { transform: translate(2px, 1px); }
  100% { transform: translate(0); }
}

@keyframes glitch2 {
  0% { transform: translate(0); }
  20% { transform: translate(3px, -2px); }
  40% { transform: translate(-3px, 2px); }
  60% { transform: translate(2px, 1px); }
  80% { transform: translate(-2px, -1px); }
  100% { transform: translate(0); }
}

/* === SMOOTH SCALE ON SCROLL === */
.scroll-scale {
  transition: transform 0.6s var(--ease-out);
}

.scroll-scale.in-view {
  transform: scale(1);
}

/* === LINE DRAW ANIMATION === */
.line-draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 2s var(--ease-out);
}

.line-draw.visible {
  stroke-dashoffset: 0;
}

/* === CARD SHIMMER LOADING === */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--surface) 25%,
    var(--surface-2) 50%,
    var(--surface) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* === BLUR REVEAL === */
.blur-reveal {
  filter: blur(10px);
  opacity: 0;
  transition: filter 0.8s var(--ease-out), opacity 0.8s var(--ease-out);
}

.blur-reveal.visible {
  filter: blur(0);
  opacity: 1;
}

/* === BORDER GLOW ON HOVER === */
.border-glow {
  position: relative;
}

.border-glow::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--text-primary), transparent, var(--text-primary));
  z-index: -1;
  opacity: 0;
  transition: opacity var(--duration-normal);
}

.border-glow:hover::after {
  opacity: 0.15;
}

/* === SCALE BOUNCE === */
@keyframes scaleBounce {
  0% { transform: scale(0.8); opacity: 0; }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.scale-bounce {
  animation: scaleBounce 0.6s var(--ease-out) forwards;
}

/* === ROTATE IN === */
@keyframes rotateIn {
  from { transform: rotate(-10deg) scale(0.9); opacity: 0; }
  to { transform: rotate(0) scale(1); opacity: 1; }
}

.rotate-in {
  animation: rotateIn 0.5s var(--ease-out) forwards;
}

/* === SLIDE FROM LEFT === */
@keyframes slideFromLeft {
  from { transform: translateX(-40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.slide-left {
  animation: slideFromLeft 0.6s var(--ease-out) forwards;
}

/* === SLIDE FROM RIGHT === */
@keyframes slideFromRight {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.slide-right {
  animation: slideFromRight 0.6s var(--ease-out) forwards;
}

/* === FADE IN UP (staggered) === */
@keyframes fadeInUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.fade-in-up {
  animation: fadeInUp 0.6s var(--ease-out) forwards;
}

/* === COUNTER FLIP === */
.counter-flip {
  display: inline-block;
  animation: counterFlip 0.4s var(--ease-out);
}

@keyframes counterFlip {
  0% { transform: translateY(-100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}



/* Admin login modal */
.admin-login-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: oklch(0.10 0 0 / 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 10001;
  align-items: center;
  justify-content: center;
}

.admin-login-overlay.active {
  display: flex;
}

.admin-login-box {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px 40px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  animation: loginBoxIn 0.5s var(--ease-out);
  box-shadow: 0 40px 80px oklch(0 0 0 / 0.35);
}

@keyframes loginBoxIn {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.admin-login-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-6);
  color: var(--text-primary);
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.admin-login-box h3 {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.admin-login-box p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}

.admin-input-group {
  margin-bottom: var(--space-3);
}

.admin-input-group .form-input {
  width: 100%;
  padding: 14px 16px;
  font-size: var(--text-base);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.admin-input-group .form-input:focus {
  outline: none;
  border-color: var(--text-secondary);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--text-primary) 8%, transparent);
}

.admin-input-group .form-input::placeholder {
  color: var(--text-secondary);
}

.admin-login-box .form-submit {
  width: 100%;
  margin-top: var(--space-4);
  padding: 14px;
  font-size: var(--text-sm);
  font-weight: 600;
  background: var(--text-primary);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: opacity var(--duration-fast), transform var(--duration-fast);
}

.admin-login-box .form-submit:hover {
  opacity: 0.85;
}

.admin-login-box .form-submit:active {
  transform: scale(0.98);
}

.admin-login-error {
  font-size: var(--text-sm);
  color: #ef4444;
  margin-top: var(--space-4);
  display: none;
}

.admin-login-error.visible {
  display: block;
  animation: errorShake 0.4s ease;
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.admin-login-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: all var(--duration-fast);
}

.admin-login-close:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
  background: var(--surface-2);
}

/* === GRID PATTERN BACKGROUND === */
.grid-pattern {
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.15;
}

/* === VECTOR LINE DECORATIONS === */
.hero-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-lines svg {
  position: absolute;
  width: 100%;
  height: 100%;
}

.hero-lines line,
.hero-lines path {
  stroke: var(--border);
  stroke-width: 0.5;
  fill: none;
  opacity: 0.3;
}

.hero-lines circle {
  fill: var(--text-secondary);
  opacity: 0.2;
}

.hero-lines rect {
  stroke: var(--border);
  stroke-width: 0.5;
  fill: none;
  opacity: 0.15;
}

.section-deco {
  position: absolute;
  pointer-events: none;
}

.section-deco svg {
  display: block;
}

.section-deco line,
.section-deco path,
.section-deco circle,
.section-deco rect {
  stroke: var(--border);
  stroke-width: 0.5;
  fill: none;
  opacity: 0.25;
}

.section-deco--accent line,
.section-deco--accent path,
.section-deco--accent circle {
  stroke: var(--text-secondary);
  opacity: 0.15;
}

/* Stagger animation for vector lines */
@keyframes drawLine {
  from { stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}

.hero-lines line,
.hero-lines path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
}

.hero.loaded .hero-lines line,
.hero.loaded .hero-lines path {
  animation: drawLine 3s var(--ease-out) forwards;
}

.hero.loaded .hero-lines line:nth-child(2),
.hero.loaded .hero-lines path:nth-child(2) {
  animation-delay: 0.3s;
}

.hero.loaded .hero-lines line:nth-child(3),
.hero.loaded .hero-lines path:nth-child(3) {
  animation-delay: 0.6s;
}

.hero.loaded .hero-lines line:nth-child(4),
.hero.loaded .hero-lines path:nth-child(4) {
  animation-delay: 0.9s;
}

@media (prefers-reduced-motion: reduce) {
  .hero-lines line,
  .hero-lines path {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    animation: none;
  }
}

/* === SERVICES SECTION === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.service-card {
  padding: var(--space-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  border-color: var(--text-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--duration-normal);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-6);
  color: var(--text-primary);
}

.service-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.service-title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.service-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* === PROCESS SECTION === */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  position: relative;
}

.process-steps::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), var(--border), transparent);
}

.process-step {
  text-align: center;
  position: relative;
}

.process-step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 600;
  position: relative;
  z-index: 1;
  transition: border-color var(--duration-normal), background var(--duration-normal);
}

.process-step:hover .process-step-number {
  border-color: var(--text-secondary);
  background: var(--surface-2);
}

.process-step-title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.process-step-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .process-steps {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }
  .process-steps::before { display: none; }
}

@media (max-width: 480px) {
  .process-steps {
    grid-template-columns: 1fr;
  }
}

/* === ENHANCED FOOTER === */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-16);
  margin-bottom: var(--space-12);
}

.footer-brand h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.footer-brand p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 320px;
}

.footer-col h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.footer-col a {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding: var(--space-1) 0;
  transition: color var(--duration-fast);
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
}

.footer-copy {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: var(--space-6);
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color var(--duration-fast);
}

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

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
}

/* === MOBILE OPTIMIZATION === */
@media (max-width: 768px) {
  /* Global */
  :root {
    --space-32: 5rem;
    --space-16: 3rem;
  }

  .section {
    padding: var(--space-32) 0;
  }

  .container {
    padding: 0 var(--space-4);
  }

  /* Nav */
  .nav {
    padding: 0 var(--space-4);
  }

  .nav-logo {
    font-size: var(--text-base);
  }

  /* Hero */
  .hero {
    min-height: 100svh;
    padding: var(--nav-height) var(--space-4) var(--space-8);
  }

  .hero-title {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
    line-height: 1.05;
  }

  .hero-subtitle {
    font-size: var(--text-base);
    line-height: 1.6;
  }

  .hero-cta {
    flex-direction: column;
    gap: var(--space-3);
    width: 100%;
  }

  .hero-cta .btn-primary,
  .hero-cta .btn-secondary {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .hero-content::before {
    inset: -30px -20px;
  }

  .hero-scroll { display: none; }

  /* Section headers */
  .section-header {
    margin-bottom: var(--space-10);
  }

  .section-header h2 {
    font-size: var(--text-3xl);
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .about-image {
    max-width: 280px;
    margin: 0 auto;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    padding: var(--space-6) 0;
  }

  .stat-number {
    font-size: var(--text-2xl);
  }

  .stat-label {
    font-size: 0.65rem;
  }

  /* Cases */
  .cases-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .case-card-body {
    padding: var(--space-4);
  }

  .case-card-title {
    font-size: var(--text-lg);
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .service-card {
    padding: var(--space-6);
  }

  .service-icon {
    width: 40px;
    height: 40px;
  }

  /* Process */
  .process-steps {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }

  .process-step-number {
    width: 40px;
    height: 40px;
    font-size: var(--text-xs);
    margin-bottom: var(--space-4);
  }

  .process-step-title {
    font-size: var(--text-base);
  }

  .process-step-desc {
    font-size: var(--text-sm);
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .contact-heading {
    font-size: var(--text-3xl);
  }

  .contact-form {
    gap: var(--space-4);
  }

  /* Modal */
  .case-modal-content {
    width: 95%;
    border-radius: var(--radius-md);
  }

  .case-modal-body {
    padding: var(--space-5);
  }

  .case-modal-title {
    font-size: var(--text-xl);
  }

  /* Theme toggle & admin btn */
  .theme-toggle {
    width: 42px;
    height: 42px;
    bottom: var(--space-4);
    right: var(--space-4);
  }

  .admin-btn {
    width: 38px;
    height: 38px;
    bottom: var(--space-4);
    left: var(--space-4);
  }

  /* Geo rotate decorations */
  .geo-rotate { display: none; }

  /* Morph blobs */
  .morph-blob { display: none; }

  /* Floating orbs */
  .floating-orb { display: none; }

  /* ASCII art */
  .ascii-art { display: none; }
}

/* Extra small */
@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(1.8rem, 9vw, 3rem);
  }

  .hero-label {
    font-size: 0.65rem;
  }

  .section-header h2 {
    font-size: var(--text-2xl);
  }

  .about-name {
    font-size: var(--text-2xl);
  }

  .about-bio {
    font-size: var(--text-base);
  }

  .process-steps {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .contact-heading {
    font-size: var(--text-2xl);
  }

  .contact-avatar {
    width: 80px;
    height: 80px;
  }

  .contact-tg-link {
    width: 100%;
    justify-content: center;
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--space-3);
    text-align: center;
  }
}

/* === COMPREHENSIVE MOBILE ADAPTATION === */
@media (max-width: 768px) {
  /* Navigation */
  .nav {
    padding: 0 var(--space-4);
  }

  .nav-logo {
    font-size: var(--text-base);
  }

  /* Hero */
  .hero {
    min-height: auto;
    padding: calc(var(--nav-height) + var(--space-16)) 0 var(--space-16);
  }

  .hero-title {
    font-size: clamp(2rem, 10vw, 3.5rem);
    letter-spacing: -0.03em;
  }

  .hero-subtitle {
    font-size: var(--text-base);
    max-width: 100%;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn-primary,
  .hero-cta .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  /* Sections */
  .section {
    padding: var(--space-16) 0;
  }

  .section-header {
    margin-bottom: var(--space-8);
  }

  .section-header h2 {
    font-size: var(--text-2xl);
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .about-image {
    max-width: 200px;
    margin: 0 auto;
  }

  .about-stats {
    gap: var(--space-4);
    padding: var(--space-6) 0;
  }

  .stat-number {
    font-size: var(--text-xl);
  }

  .stat-label {
    font-size: 0.65rem;
  }

  /* Cases */
  .cases-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .case-card-body {
    padding: var(--space-4);
  }

  .case-card-title {
    font-size: var(--text-lg);
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .service-card {
    padding: var(--space-6);
  }

  /* Process */
  .process-steps {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .process-step {
    padding: var(--space-4);
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .contact-info {
    text-align: center;
    align-items: center;
  }

  .contact-heading {
    font-size: var(--text-2xl);
  }

  .form-textarea {
    min-height: 100px;
  }

  /* Case Modal */
  .case-modal-content {
    width: 95%;
    max-height: 85vh;
  }

  .case-modal-body {
    padding: var(--space-4);
  }

  .case-modal-title {
    font-size: var(--text-xl);
  }

  /* Theme toggle */
  .theme-toggle {
    width: 40px;
    height: 40px;
    bottom: var(--space-4);
    right: var(--space-4);
  }

  .theme-toggle svg {
    width: 18px;
    height: 18px;
  }

  /* Consent banner */
  #consent-banner {
    width: calc(100% - 16px);
    bottom: 16px;
    padding: 16px;
    border-radius: 12px;
  }

  /* Easter egg */
  .easter-egg {
    display: none;
  }
}

/* Touch-specific improvements */
@media (hover: none) and (pointer: coarse) {
  .case-card:hover {
    transform: none;
    box-shadow: none;
  }

  .service-card:hover {
    transform: none;
    box-shadow: none;
  }

  .btn-primary:hover,
  .btn-secondary:hover {
    transform: none;
  }

  .contact-tg-link:hover {
    transform: none;
  }

  /* Larger touch targets */
  .nav-links a {
    padding: var(--space-2) 0;
  }

  .admin-nav-btn {
    min-height: 44px;
  }

  .form-input,
  .form-textarea {
    min-height: 48px;
  }

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

/* Safe area for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
  .footer {
    padding-bottom: calc(var(--space-8) + env(safe-area-inset-bottom));
  }

  .nav-mobile {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Dark mode adjustments for mobile */
@media (max-width: 768px) and (prefers-color-scheme: dark) {
  .contact-tg-link {
    background: var(--surface);
  }
}
