:root {
  --bg: #06131f;
  --bg-strong: #0b1f2d;
  --panel: rgba(12, 24, 38, 0.92);
  --panel-soft: rgba(17, 31, 46, 0.74);
  --line: rgba(255, 255, 255, 0.08);
  --text: #edf6ff;
  --muted: #a9bad3;
  --primary: #7ea3ff;
  --primary-strong: #5177ff;
  --accent: #49d7a2;
  --shadow: 0 28px 60px rgba(4, 9, 19, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(180deg, #06131f 0%, #0a1d2d 100%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea,
select {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(6, 19, 31, 0.72);
  border-bottom: 1px solid var(--line);
}

.google-ad-banner {
  position: relative;
  margin: 24px auto 0;
  padding: 18px 18px 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.google-ad-banner--compact {
  margin: 16px auto 40px;
}

.ad-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  background: rgba(126, 163, 255, 0.12);
  color: #c5d5ff;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.adsbygoogle {
  display: block;
  min-height: 90px;
  border-radius: 14px;
  background: rgba(10, 17, 25, 0.82);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 80px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #9bb8ff 0%, #d9e6ff 28%, #7ea3ff 100%);
  color: #0a1625;
  font-weight: 900;
  font-size: 1.2rem;
  box-shadow: 0 12px 24px rgba(126, 163, 255, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.08));
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  top: -8px;
  right: -6px;
  background: rgba(255, 255, 255, 0.28);
  filter: blur(6px);
}

.brand-mark,
.brand-mark::before,
.brand-mark::after {
  z-index: 0;
}

.brand-mark {
  z-index: 1;
}

.brand span {
  position: relative;
  display: inline-block;
  font-size: 1.08rem;
  letter-spacing: -0.05em;
  text-shadow: 0 2px 18px rgba(126, 163, 255, 0.2);
}

.tab-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
}

.tab-button {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.tab-button.active {
  background: rgba(126, 163, 255, 0.15);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(126, 163, 255, 0.24);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  border: none;
  border-radius: 14px;
  padding: 0.9rem 1.4rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #edf6ff;
  box-shadow: 0 18px 30px rgba(81, 119, 255, 0.32);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  color: var(--text);
}

.page-shell {
  padding: 52px 0 70px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.hero-block {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 30px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  color: #b8cbff;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.76rem;
}

.hero-copy h1 {
  margin: 0;
  letter-spacing: -0.06em;
  font-size: clamp(2.8rem, 4vw, 4.7rem);
  line-height: 0.95;
}

.hero-copy p {
  margin: 18px 0 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.showcase-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(4, 9, 19, 0.22);
}

.showcase-label {
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.portfolio-card {
  background: rgba(12, 24, 38, 0.9);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.portfolio-card.wide {
  grid-column: 1 / -1;
}

.portfolio-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.portfolio-card.wide img {
  height: 260px;
}

.card-caption {
  padding: 14px 16px 18px;
}

.card-caption strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.card-caption span {
  color: var(--muted);
  font-size: 0.9rem;
}

.form-shell,
.experts-shell,
.login-shell {
  padding-top: 14px;
}

.form-header,
.section-heading {
  margin-bottom: 26px;
}

.form-header h2,
.section-heading h2,
.login-copy h2 {
  margin: 0;
  letter-spacing: -0.05em;
  font-size: clamp(2.1rem, 3vw, 3rem);
}

.login-card {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 28px;
  align-items: center;
  padding: 28px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 12px 30px rgba(4, 9, 19, 0.18);
}

.login-copy {
  padding-right: 10px;
}

.login-copy p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.login-form {
  background: rgba(7, 17, 27, 0.7);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
}

.login-form label {
  display: block;
  margin-bottom: 18px;
  font-weight: 600;
}

.login-form input {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  padding: 0.9rem 1rem;
}

.login-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 20px;
  font-size: 0.9rem;
}

.login-meta a,
.signup-link a {
  color: #cfe0ff;
}

.remember-me {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.remember-me input {
  width: auto;
  margin: 0;
}

.login-divider {
  position: relative;
  margin: 22px 0 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1px;
  background: var(--line);
}

.login-divider span {
  position: relative;
  display: inline-block;
  background: rgba(7, 17, 27, 0.8);
  padding: 0 12px;
}

.social-btn {
  width: 100%;
}

.signup-link {
  margin: 18px 0 0;
  text-align: center;
  color: var(--muted);
}

.questionnaire {
  max-width: 820px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 12px 30px rgba(4, 9, 19, 0.18);
}

.project-feed {
  max-width: 820px;
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px 28px;
}

.finished-form-toggle,
.engineer-form-toggle {
  margin-bottom: 18px;
}

.finished-project-form.hidden,
.engineer-form.hidden {
  display: none;
}

.feed-header h3 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 2rem);
  letter-spacing: -0.04em;
}

.project-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.posted-project-card {
  background: rgba(10, 20, 31, 0.9);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}

.posted-project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.posted-project-top strong {
  font-size: 1.08rem;
}

.posted-project-top span {
  color: #b8cbff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.posted-project-card p {
  margin: 0;
  color: var(--muted);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.project-meta span {
  display: inline-flex;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: #edf6ff;
  font-size: 0.74rem;
}

.project-taken-count {
  background: rgba(73, 215, 162, 0.12);
  border-color: rgba(73, 215, 162, 0.2);
  color: #baf3d5;
}

.finished-project-card {
  overflow: hidden;
}

.home-feed-wrap {
  margin-top: 42px;
}

.home-feed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.home-feed-column {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 12px 30px rgba(4, 9, 19, 0.12);
}

.home-feed-header {
  margin-bottom: 18px;
}

.home-feed-header h3 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  letter-spacing: -0.04em;
}

.home-feed-list {
  display: grid;
  gap: 16px;
}

.finished-project-visual {
  margin: -18px -18px 18px;
  border-bottom: 1px solid var(--line);
}

.finished-project-visual img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.request-card {
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.request-card:hover {
  border-color: rgba(126, 163, 255, 0.4);
  transform: translateY(-1px);
}

.request-contact {
  display: none;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.request-card.expanded .request-contact {
  display: flex;
}

.request-contact a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  background: rgba(126, 163, 255, 0.12);
  border: 1px solid rgba(126, 163, 255, 0.24);
  color: var(--text);
  font-weight: 600;
}

.empty-projects {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 18px;
  color: var(--muted);
}

.submission-status {
  margin-bottom: 18px;
  min-height: 24px;
  color: #a8f0c7;
  font-weight: 600;
}

.submission-status.error {
  color: #ffb4b4;
}

.questionnaire label {
  display: block;
  margin-bottom: 20px;
  font-weight: 600;
  color: var(--text);
}

.questionnaire input,
.questionnaire textarea,
.questionnaire select {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  padding: 0.9rem 1rem;
}

.questionnaire textarea {
  resize: vertical;
  min-height: 130px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.choice-section {
  margin: 16px 0 24px;
}

.choice-section span {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
}

.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-pill {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  padding: 0.65rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}

.choice-pill.active {
  background: rgba(126, 163, 255, 0.14);
  border-color: rgba(126, 163, 255, 0.3);
  color: var(--text);
}

.submit-btn {
  width: 100%;
}

.engineer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
  padding: 0.2rem 0;
}

.search-box input::placeholder {
  color: var(--muted);
}

.engineer-type-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.engineer-type-panel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.engineer-type-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 200px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  border-radius: 14px;
  padding: 0.8rem 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.engineer-type-toggle .chevron {
  color: var(--muted);
  font-size: 0.8rem;
}

.engineer-type-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 15;
  display: none;
  min-width: 260px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(10, 20, 31, 0.96);
  box-shadow: 0 18px 36px rgba(2, 8, 15, 0.42);
}

.engineer-type-menu.open {
  display: grid;
  gap: 8px;
}

.type-option {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.7rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.type-option:hover {
  border-color: rgba(126, 163, 255, 0.3);
  color: var(--text);
}

.type-option.active {
  background: linear-gradient(135deg, rgba(126, 163, 255, 0.18), rgba(73, 215, 162, 0.12));
  border-color: rgba(126, 163, 255, 0.45);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(126, 163, 255, 0.2);
}

.engineer-type-select {
  display: none;
}

.search-engineers-btn {
  white-space: nowrap;
}

.experts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.expert-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 10px 22px rgba(4, 9, 19, 0.14);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.expert-card:hover {
  border-color: rgba(126, 163, 255, 0.4);
  transform: translateY(-1px);
}

.expert-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.expert-body {
  padding: 18px 18px 20px;
}

.expert-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.expert-topline h3 {
  margin: 0;
  font-size: 1.2rem;
}

.rating {
  color: #ffd56b;
  font-weight: 700;
}

.expert-body p {
  margin: 10px 0 0;
  color: var(--muted);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.skill-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: #eaf2ff;
  font-size: 0.72rem;
}

.expert-contact {
  display: none;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.expert-card.expanded .expert-contact {
  display: block;
}

.expert-contact > span {
  display: block;
  margin-bottom: 12px;
  color: #d7e6ff;
  font-weight: 600;
}

.expert-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.expert-contact-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.65rem 0.9rem;
  background: rgba(126, 163, 255, 0.12);
  border: 1px solid rgba(126, 163, 255, 0.24);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 36px;
  background: rgba(6, 19, 31, 0.7);
}

.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero-block,
  .experts-grid,
  .login-card,
  .home-feed-grid,
  .field-row,
  .portfolio-grid {
    grid-template-columns: 1fr !important;
  }

  .nav {
    flex-wrap: wrap;
    padding: 16px 0;
  }

  .tab-nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .nav-actions {
    margin-left: auto;
  }
}

@media (max-width: 700px) {
  .hero-block,
  .experts-grid,
  .field-row,
  .portfolio-grid,
  .home-feed-grid,
  .login-card {
    grid-template-columns: 1fr !important;
  }

  .nav {
    justify-content: center;
  }

  .nav-actions {
    width: 100%;
    justify-content: center;
  }

  .engineer-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    width: 100%;
  }

  .tab-nav,
  .nav-actions {
    flex-wrap: wrap;
  }

  .questionnaire,
  .login-card,
  .login-form {
    padding: 20px;
  }

  .footer-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}
