:root {
  --bg: #0e1018;
  --surface: #171a26;
  --surface-soft: #1f2333;
  --text: #f6f7fb;
  --muted: #c3c8dd;
  --accent: #6a8dff;
  --accent-2: #59d7be;
  --danger: #ff5f72;
  --radius: 16px;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", sans-serif;
}

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

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.hero {
  min-height: 72vh;
  background:
    radial-gradient(circle at 16% 20%, rgba(90, 216, 191, 0.22), transparent 34%),
    radial-gradient(circle at 86% 20%, rgba(106, 141, 255, 0.26), transparent 34%),
    linear-gradient(180deg, #121625 0%, var(--bg) 100%);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 0;
}

.logo {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
}

.hero-content {
  padding: 56px 0 72px;
}

.eyebrow {
  color: var(--accent-2);
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  margin: 0 0 16px;
}

h1,
h2,
h3 {
  font-family: "Montserrat", sans-serif;
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4.8vw, 3.5rem);
  max-width: 900px;
}

.subtitle {
  max-width: 760px;
  color: var(--muted);
  margin: 18px 0 30px;
  font-size: 1.05rem;
}

.section {
  padding: 80px 0;
}

.section-muted {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.03));
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 28px;
}

.about-text {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 850px;
}

.grid-services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.service-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.service-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.grid-projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.project-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-image {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.project-content {
  padding: 16px;
}

.project-title {
  font-size: 1.15rem;
}

.project-description {
  color: var(--muted);
  margin: 10px 0 16px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.tag {
  background: rgba(106, 141, 255, 0.18);
  border: 1px solid rgba(106, 141, 255, 0.35);
  color: #dbe4ff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
}

.project-link {
  color: var(--accent-2);
  font-weight: 700;
}

.project-controls {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contacts a {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 12px 16px;
  border-radius: 10px;
}

.btn {
  background: linear-gradient(90deg, var(--accent), #89a8ff);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-small {
  padding: 9px 12px;
  font-size: 0.9rem;
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-danger {
  background: rgba(255, 95, 114, 0.16);
  border: 1px solid rgba(255, 95, 114, 0.45);
}

.editor-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: rgba(15, 18, 27, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px;
  max-width: 320px;
  z-index: 50;
}

.editor-panel p {
  color: var(--muted);
  margin: 6px 0 12px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.upload-btn input {
  display: none;
}

dialog {
  border: none;
  border-radius: 14px;
  background: #171b2b;
  color: var(--text);
  width: min(560px, 92vw);
  padding: 0;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

#projectForm {
  display: grid;
  gap: 12px;
  padding: 18px;
}

#projectForm label {
  display: grid;
  gap: 6px;
  color: #d2d7ec;
  font-size: 0.92rem;
}

#projectForm input,
#projectForm textarea {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #232941;
  color: var(--text);
  border-radius: 10px;
  padding: 10px;
  font-family: inherit;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

[contenteditable="true"] {
  outline: 1px dashed rgba(89, 215, 190, 0.55);
  outline-offset: 5px;
  border-radius: 6px;
}

.hidden {
  display: none !important;
}

@media (max-width: 700px) {
  .section {
    padding: 62px 0;
  }

  .editor-panel {
    left: 12px;
    right: 12px;
    max-width: none;
  }
}
