:root {
  --bg: #08111f;
  --bg-soft: #0e1b2f;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --card: #ffffff;
  --card-soft: #f4f7fb;
  --text: #0f172a;
  --text-light: #eef4ff;
  --muted: #6b7280;
  --line: #d9e1ec;
  --primary: #00c2a8;
  --primary-strong: #00a08b;
  --danger: #b42318;
  --warning: #b54708;
  --success: #027a48;
  --radius: 22px;
  --shadow: 0 18px 50px rgba(4, 14, 30, 0.08);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #f2f6fb;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1rem; }
h1, h2, h3, h4 { margin: 0 0 1rem; line-height: 1.1; }
h1 { font-size: clamp(2.5rem, 5vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: 1.2rem; }
small { display: block; }
code { background: #eef2f7; padding: 0.15rem 0.45rem; border-radius: 8px; }

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: rgba(8, 17, 31, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-wrap,
.admin-header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--text-light);
}
.brand strong { display: block; letter-spacing: 0.04em; }
.brand small { color: rgba(238, 244, 255, 0.75); font-size: 0.84rem; }
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #61f0df);
  color: #03111d;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(0, 194, 168, 0.25);
}

.main-nav,
.admin-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.main-nav a,
.admin-nav a {
  color: var(--text-light);
  opacity: 0.88;
  font-weight: 600;
}
.main-nav a.active,
.main-nav a:hover,
.admin-nav a:hover { opacity: 1; }

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
}

.hero-section,
.page-hero,
.project-hero {
  color: var(--text-light);
  background:
    radial-gradient(circle at top right, rgba(0, 194, 168, 0.22), transparent 24%),
    radial-gradient(circle at top left, rgba(57, 121, 255, 0.18), transparent 24%),
    linear-gradient(180deg, #08111f 0%, #0b1628 100%);
}
.hero-section { padding: 6rem 0 4rem; }
.page-hero.compact { padding: 4rem 0 2.8rem; }
.project-hero { padding-bottom: 3rem; }
.hero-grid,
.project-hero-grid,
.split-grid,
.contact-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #cce7ff;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}
.lead { font-size: 1.1rem; color: rgba(238, 244, 255, 0.82); max-width: 60ch; }
.hero-actions,
.cta-actions,
.filter-actions,
.table-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.glass-card,
.card,
.project-card,
.cta-box,
.stat-card,
.feature-item,
.filter-bar {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.glass-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
}
.card,
.project-card,
.filter-bar,
.cta-box,
.feature-item,
.contact-card,
.table-card,
.form-card {
  background: white;
  border: 1px solid rgba(9, 30, 66, 0.08);
}
.card,
.contact-card,
.table-card,
.form-card,
.cta-box { padding: 1.5rem; }
.section { padding: 4.5rem 0; }
.section-muted { background: linear-gradient(180deg, #f2f6fb 0%, #e9eff8 100%); }
.section-head { margin-bottom: 1.6rem; }
.section-head.between {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.cards-grid,
.stat-grid,
.gallery-grid,
.mini-gallery-grid,
.feature-list {
  display: grid;
  gap: 1.2rem;
}
.projects-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mini-gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.feature-list { grid-template-columns: repeat(1, minmax(0, 1fr)); }

.project-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.project-image,
.gallery-image,
.mini-gallery-item img {
  width: 100%;
  object-fit: cover;
}
.project-image,
.placeholder-card { aspect-ratio: 4 / 3; }
.gallery-image { aspect-ratio: 4 / 3; border-radius: 16px; }
.project-content { padding: 1.2rem; }
.project-content p { color: var(--muted); }
.project-meta,
.project-facts,
.footer-grid,
.footer-bottom,
.mini-gallery-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.project-meta,
.project-facts,
.mini-gallery-meta {
  justify-content: space-between;
  align-items: center;
}
.placeholder-card {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ecf2fb, #dce7f7);
  color: #516176;
}

.chip,
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 700;
}
.chip { background: #e6fbf8; color: #03675b; }
.status-success { background: #e9f8ef; color: var(--success); }
.status-warning { background: #fff1db; color: var(--warning); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 0.95rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #28dbc6);
  color: #02211d;
  box-shadow: 0 16px 28px rgba(0, 194, 168, 0.22);
}
.btn-outline {
  background: transparent;
  color: inherit;
  border-color: rgba(255, 255, 255, 0.22);
}
.card .btn-outline,
.form-card .btn-outline,
.table-card .btn-outline,
.admin-body .btn-outline {
  color: var(--text);
  border-color: #cbd7e6;
}
.btn-danger {
  background: #fff1f1;
  color: var(--danger);
  border-color: #f1b5b5;
}
.btn-sm { padding: 0.65rem 0.9rem; border-radius: 14px; font-size: 0.92rem; }
.text-link { color: #0e6fff; font-weight: 700; }

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.2rem;
}
.filter-label { font-weight: 700; }
.input-select { min-width: 220px; }

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.compact-form { grid-template-columns: 1fr; }
.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.field-group-full { grid-column: 1 / -1; }
label { font-weight: 700; font-size: 0.95rem; }
input,
textarea,
select {
  width: 100%;
  border: 1px solid #cbd7e6;
  border-radius: 16px;
  padding: 0.9rem 1rem;
  font: inherit;
  color: var(--text);
  background: white;
}
textarea { resize: vertical; }
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #3eb3ff;
  box-shadow: 0 0 0 4px rgba(62, 179, 255, 0.12);
}
.help-text,
.muted,
.small { color: var(--muted); }
.small { font-size: 0.88rem; }
.mt-16 { margin-top: 1rem; }
.mt-24 { margin-top: 1.5rem; }

.alert {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}
.alert-success { background: #edfdf3; border-color: #abefc6; color: var(--success); }
.alert-error { background: #fff5f5; border-color: #fbc2c4; color: #912018; }
.alert-info { background: #eef6ff; border-color: #b9d8ff; color: #175cd3; }

.contact-card.alt { background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); }
.contact-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.8rem; }

.site-footer {
  background: #07111f;
  color: #c8d4e9;
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  justify-content: space-between;
  align-items: start;
}
.footer-grid > div { flex: 1 1 220px; }
.footer-grid h3,
.footer-grid h4 { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.cta-section { padding-top: 0; }
.cta-box {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.login-body,
.admin-body {
  background: linear-gradient(180deg, #eff4fb 0%, #e6edf8 100%);
  min-height: 100vh;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.login-card {
  width: min(100%, 460px);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 17, 31, 0.92);
  backdrop-filter: blur(16px);
}
.admin-main { padding: 2rem 0 4rem; }
.admin-section { display: grid; gap: 1.5rem; }
.admin-section.narrow { max-width: 980px; }
.table-responsive { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.admin-table th,
.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid #e5edf7;
  text-align: left;
  vertical-align: top;
}
.admin-table thead th {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.check-wrap {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}
.field-checks {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.mini-gallery-item {
  background: #f7faff;
  border: 1px solid #e0e8f4;
  border-radius: 18px;
  overflow: hidden;
}
.mini-gallery-item img { aspect-ratio: 1 / 1; }
.mini-gallery-meta { padding: 0.9rem; }
.empty-state {
  display: grid;
  gap: 0.6rem;
  place-items: start;
}
.empty-state.compact { padding: 1rem 0; }

@media (max-width: 1100px) {
  .projects-grid,
  .gallery-grid,
  .mini-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid,
  .project-hero-grid,
  .split-grid,
  .contact-grid,
  .cta-box { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .main-nav {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + 0.5rem);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: rgba(8, 17, 31, 0.96);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 0.5rem 0; }
  .form-grid,
  .projects-grid,
  .stat-grid,
  .gallery-grid,
  .mini-gallery-grid { grid-template-columns: 1fr; }
  .section-head.between,
  .filter-bar,
  .cta-box,
  .footer-grid,
  .footer-bottom,
  .project-meta,
  .project-facts,
  .admin-header-wrap,
  .admin-nav {
    flex-direction: column;
    align-items: stretch;
  }
  h1 { font-size: clamp(2.2rem, 10vw, 3rem); }
  .hero-section { padding-top: 4.6rem; }
}
