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

:root {
  --bg: #061526;
  --bg-2: #0b223d;
  --panel: rgba(14, 34, 60, 0.78);
  --panel-border: rgba(133, 184, 255, 0.18);
  --text: #ecf7ff;
  --muted: rgba(236, 247, 255, 0.72);
  --accent: #48b6ff;
  --accent-2: #7dd3fc;
  --glow: rgba(72, 182, 255, 0.34);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background:
    radial-gradient(circle at top left, rgba(72,182,255,0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(125,211,252,0.12), transparent 24%),
    linear-gradient(180deg, #071420 0%, #061320 45%, #050e19 100%);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(125,211,252,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(125,211,252,0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.6), transparent 95%);
  pointer-events: none;
  opacity: 0.3;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}
.section {
  padding: 96px 0;
  position: relative;
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-2);
  font-size: 12px;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(38px, 7vw, 72px); line-height: 1.04; }
h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; }
p { color: var(--muted); line-height: 1.8; }

.glass {
  background: linear-gradient(180deg, rgba(15, 39, 68, 0.86), rgba(8, 22, 39, 0.72));
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.26);
  background: linear-gradient(135deg, rgba(72, 182, 255, 0.26), rgba(125, 211, 252, 0.12));
  color: var(--text);
  box-shadow: 0 0 0 0 rgba(72, 182, 255, 0.0);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
  cursor: pointer;
}
.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 211, 252, 0.7);
  box-shadow: 0 0 24px rgba(72, 182, 255, 0.28);
}
.btn.primary {
  background: linear-gradient(135deg, rgba(72, 182, 255, 0.95), rgba(125, 211, 252, 0.88));
  color: #03111f;
  font-weight: 700;
  box-shadow: 0 0 28px rgba(72, 182, 255, 0.34);
}
.btn.primary:hover { box-shadow: 0 0 36px rgba(72, 182, 255, 0.5); }
.btn.ghost { background: rgba(255,255,255,0.02); }
.btn.small { min-height: 42px; padding: 0 16px; font-size: 14px; }

.hero {
  padding: 34px 0 88px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 30px;
  align-items: center;
}
.hero-card, .content-card, .tech-card, .service-card, .project-card, .admin-card, .stat-card {
  position: relative;
  overflow: hidden;
}
.hero-card { padding: 34px; }
.hero-top {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 22px;
  align-items: center;
}
.avatar {
  width: 120px; height: 120px; border-radius: 28px; padding: 8px;
  background: linear-gradient(180deg, rgba(72,182,255,0.28), rgba(255,255,255,0.05));
  border: 1px solid rgba(125,211,252,0.22);
  box-shadow: 0 0 40px rgba(72,182,255,0.22);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }
.name { margin-top: 8px; font-size: clamp(34px, 5vw, 58px); }
.subtitle { color: var(--accent-2); font-size: 15px; margin-top: 8px; }
.hero-text { margin-top: 22px; max-width: 62ch; }
.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.hero-side {
  display: grid;
  gap: 18px;
}
.hero-cta {
  padding: 30px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.side-note {
  padding: 22px 24px;
  border-radius: 22px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(125,211,252,0.14);
}
.side-note strong { display: block; margin-bottom: 8px; font-size: 16px; }
.side-note span { color: var(--muted); font-size: 14px; line-height: 1.7; }

.orb, .orb2, .orb3 {
  position: absolute;
  border-radius: 50%;
  filter: blur(12px);
  opacity: .72;
  pointer-events: none;
  animation: float 14s ease-in-out infinite;
}
.orb { width: 210px; height: 210px; background: rgba(72,182,255,0.18); top: 12%; left: 8%; }
.orb2 { width: 160px; height: 160px; background: rgba(125,211,252,0.16); bottom: 12%; right: 10%; animation-duration: 18s; }
.orb3 { width: 90px; height: 90px; background: rgba(72,182,255,0.22); top: 58%; left: 44%; animation-duration: 11s; }
@keyframes float {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(18px,-26px,0) scale(1.05); }
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }

.content-card { padding: 28px; }
.stat-card { padding: 18px; min-height: 120px; }
.stat-card strong { display: block; margin-bottom: 10px; font-size: 16px; }
.stat-card p { font-size: 14px; }
.tech-card, .service-card, .project-card, .admin-card { padding: 22px; transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease; }
.tech-card:hover, .service-card:hover, .project-card:hover, .admin-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 70px rgba(0,0,0,0.34), 0 0 24px rgba(72,182,255,0.14);
  border-color: rgba(125,211,252,0.3);
}
.tech-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 94px; }
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 12px; border-radius: 999px; font-size: 12px;
  border: 1px solid rgba(125,211,252,0.2); background: rgba(255,255,255,0.03);
  color: var(--accent-2); white-space: nowrap;
}
.service-card h3, .project-card h3 { font-size: 18px; margin-bottom: 10px; }
.service-card p, .project-card p { font-size: 14px; }
.project-thumb {
  aspect-ratio: 16/10; border-radius: 18px; overflow: hidden; margin-bottom: 16px;
  border: 1px solid rgba(125,211,252,0.14);
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.project-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.project-actions .btn { flex: 1 1 110px; }
.project-actions .btn.small { min-height: 40px; }

.contact-box {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  align-items: center;
}
.contact-copy { padding: 32px; }
.contact-copy .btn { margin-top: 20px; }
.contact-panel { padding: 28px; min-height: 100%; }
.telegram-link {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-2);
}
.footer {
  padding: 34px 0 50px;
  color: var(--muted);
  font-size: 14px;
}
.footer-row { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

.reveal { opacity: 0; transform: translateY(26px) scale(0.985); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0) scale(1); }

.decor-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(125,211,252,0.36), transparent);
  margin: 22px 0;
}

.modal {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  background: rgba(2, 8, 14, 0.7); z-index: 100;
  padding: 22px;
}
.modal.open { display: flex; }
.modal-card {
  width: min(720px, 100%);
  padding: 24px;
  max-height: 90vh;
  overflow: auto;
}
.modal-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.close-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(125,211,252,0.2);
  background: rgba(255,255,255,0.04); color: var(--text); cursor: pointer;
}
.close-btn:hover { box-shadow: 0 0 18px rgba(72,182,255,0.2); }

.admin-layout {
  padding: 32px 0 80px;
}
.admin-header {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
label { font-size: 13px; color: var(--accent-2); }
input[type='text'], input[type='url'], textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(125,211,252,0.14);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  outline: none;
}
textarea { min-height: 120px; resize: vertical; }
input[type='file'] { color: var(--muted); }
.help { font-size: 12px; color: var(--muted); }
.table-wrap { overflow: auto; border-radius: 24px; }
table { width: 100%; border-collapse: collapse; min-width: 850px; }
th, td { padding: 16px; text-align: left; border-bottom: 1px solid rgba(125,211,252,0.12); vertical-align: top; }
th { color: var(--accent-2); font-size: 13px; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.preview-mini { width: 88px; height: 56px; border-radius: 12px; object-fit: cover; border: 1px solid rgba(125,211,252,0.14); }
.notice { font-size: 13px; color: var(--muted); }
.toast {
  position: fixed; right: 18px; bottom: 18px; padding: 14px 16px; border-radius: 16px;
  background: rgba(10, 29, 51, 0.9); border: 1px solid rgba(125,211,252,0.2); box-shadow: var(--shadow);
  display: none; z-index: 120;
}
.toast.show { display: block; }

@media (max-width: 980px) {
  .hero-grid, .contact-box, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 24px; }
  .hero-card { padding: 24px; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 20px, 1180px); }
  .section { padding: 72px 0; }
  .hero-top { grid-template-columns: 1fr; }
  .avatar { width: 100px; height: 100px; }
  .hero-cta, .content-card, .contact-copy, .contact-panel, .tech-card, .service-card, .project-card, .admin-card { padding: 20px; }
  .admin-form { grid-template-columns: 1fr; }
}
