:root {
  --bg: #07111f;
  --bg-soft: #0b1628;
  --surface: rgba(15, 23, 42, 0.72);
  --surface-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(226, 232, 240, 0.28);
  --text: #f8fafc;
  --muted: #a7b4c8;
  --subtle: #64748b;
  --accent: #f5c542;
  --accent-strong: #f59e0b;
  --cyan: #38bdf8;
  --green: #34d399;
  --danger: #fb7185;
  --radius: 14px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --page-inset: clamp(16px, 3vw, 48px);
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.14), transparent 32rem),
    linear-gradient(180deg, #06101d 0%, var(--bg) 48%, #08111d 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.site-main {
  flex: 1;
  width: 100%;
  padding-top: 72px;
}

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 31, 0.84);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: 100%;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 var(--page-inset);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(245, 197, 66, 0.45);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(245, 197, 66, 0.18), rgba(56, 189, 248, 0.12));
  color: var(--accent);
  font-size: 0.85rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.87rem;
  font-weight: 650;
  transition: color 160ms ease, background-color 160ms ease;
}

.nav-link:hover,
.mobile-link:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.11);
}

.nav-cta,
.btn-primary,
.btn-secondary,
.btn-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 10px;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.nav-cta,
.btn-primary {
  border: 1px solid rgba(245, 197, 66, 0.45);
  background: var(--accent);
  color: #111827;
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.18);
}

.nav-cta {
  padding: 0 16px;
  font-size: 0.88rem;
}

.btn-primary,
.btn-secondary,
.btn-quiet {
  padding: 0 18px;
}

.btn-primary:hover,
.nav-cta:hover {
  transform: translateY(-1px);
  background: #ffd35d;
}

.btn-secondary {
  border: 1px solid var(--line-strong);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: rgba(56, 189, 248, 0.44);
  background: rgba(30, 41, 59, 0.86);
}

.btn-quiet {
  border: 1px solid var(--line);
  color: var(--muted);
}

.btn-quiet:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.menu-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.78);
}

.mobile-menu {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
}

.mobile-link {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 700;
}

.page-section {
  position: relative;
  padding: 86px 0;
  overflow: hidden;
}

.page-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, transparent 0%, black 16%, black 80%, transparent 100%);
}

.section-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--page-inset);
}

.section-header {
  max-width: 760px;
  margin: 0 auto 44px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.75;
}

.section-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.02;
  font-weight: 900;
}

.section-lead {
  margin: 16px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 1.75;
}

.hero-section {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  padding: 76px 0 52px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: 54px;
}

.hero-title {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.65rem, 8vw, 5.9rem);
  line-height: 0.96;
  font-weight: 950;
}

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

.hero-subtitle {
  margin: 22px 0 0;
  color: var(--cyan);
  font-size: clamp(1.12rem, 2.5vw, 1.55rem);
  font-weight: 800;
}

.hero-copy {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.78;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.home-project-list {
  max-width: 720px;
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.home-project-list-head {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.home-project-view-all {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.home-project-view-all:hover {
  color: #ffd35d;
}

.home-project-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-project-item {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  color: var(--text);
  transition: background-color 160ms ease;
}

.home-project-item:nth-child(even) {
  border-right: 0;
}

.home-project-item:nth-child(n+3) {
  border-top: 1px solid var(--line);
}

.home-project-item:hover {
  background: rgba(56, 189, 248, 0.08);
}

div.home-project-item:hover {
  background: transparent;
}

.home-project-item span {
  min-width: 0;
}

.home-project-item strong,
.home-project-item em,
.home-project-item small {
  display: block;
}

.home-project-item strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-project-item em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  line-height: 1.3;
}

.home-project-item small {
  flex: 0 0 auto;
  max-width: 120px;
  overflow: hidden;
  color: var(--subtle);
  font-size: 0.75rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 700px;
  margin-top: 34px;
}

.metric-card,
.surface-card,
.contact-panel,
.profile-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.metric-card {
  min-height: 94px;
  padding: 16px;
  border-radius: 12px;
}

.metric-value {
  display: block;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 900;
}

.metric-label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.profile-card {
  position: relative;
  padding: 18px;
  border-radius: 18px;
}

.hero-profile-card {
  align-self: start;
  margin-top: -24px;
}

.profile-photo-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: var(--bg-soft);
  aspect-ratio: 4 / 5;
}

.profile-photo-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-caption {
  padding: 18px 2px 2px;
}

.profile-name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
}

.profile-role {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.icon-link {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(2, 6, 23, 0.32);
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.icon-link:hover {
  color: var(--text);
  border-color: rgba(245, 197, 66, 0.48);
  background: rgba(245, 197, 66, 0.1);
  transform: translateY(-1px);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.surface-card {
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.surface-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 197, 66, 0.34);
  background: rgba(15, 23, 42, 0.88);
}

.card-body {
  padding: 22px;
}

.card-title {
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 850;
}

.card-text {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.muted {
  color: var(--muted);
}

.mini-meta {
  color: var(--subtle);
  font-size: 0.85rem;
  font-weight: 700;
}

.icon-box {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 12px;
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.09);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
  font-size: 0.8rem;
  font-weight: 750;
}

.progress-track {
  width: 100%;
  height: 8px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
}

.project-image,
.blog-image {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--line);
}

.project-result {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 10px;
  color: #b7f7d8;
  background: rgba(52, 211, 153, 0.08);
  line-height: 1.55;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 28px;
  align-items: start;
}

.stack {
  display: grid;
  gap: 16px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
  gap: 24px;
}

.contact-panel {
  border-radius: var(--radius);
  padding: 26px;
}

.contact-list {
  display: grid;
  gap: 16px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: #cbd5e1;
  font-size: 0.86rem;
  font-weight: 750;
}

.dark-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.32);
  color: var(--text);
  padding: 0.75rem 0.95rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.dark-input::placeholder {
  color: #6f7f96;
}

.dark-input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.58);
  background: rgba(2, 6, 23, 0.44);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

input.dark-input:-webkit-autofill,
textarea.dark-input:-webkit-autofill {
  -webkit-text-fill-color: var(--text) !important;
  box-shadow: 0 0 0 1000px #0b1628 inset;
}

.message-success {
  border: 1px solid rgba(52, 211, 153, 0.26);
  border-radius: 10px;
  background: rgba(52, 211, 153, 0.09);
  color: #bbf7d0;
  padding: 12px 14px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.48);
}

.footer-grid {
  width: 100%;
  margin: 0 auto;
  padding: 46px var(--page-inset) 28px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 28px;
}

.footer-title {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 850;
}

.footer-text,
.footer-link {
  color: var(--muted);
  line-height: 1.7;
}

.footer-link:hover {
  color: var(--text);
}

.footer-bottom {
  width: 100%;
  margin: 0 auto;
  padding: 18px var(--page-inset) 28px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 0.88rem;
  text-align: center;
}

.chat-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(245, 197, 66, 0.45);
  border-radius: 16px;
  background: var(--accent);
  color: #111827;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.34);
  cursor: pointer;
  font-size: 1.28rem;
}

.status-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--bg);
  border-radius: 999px;
}

.chat-window {
  position: fixed;
  right: 22px;
  bottom: 94px;
  z-index: 50;
  width: min(380px, calc(100vw - 28px));
  height: min(560px, calc(100vh - 128px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(8, 17, 31, 0.98);
  box-shadow: var(--shadow);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.82);
}

.chat-title {
  font-weight: 850;
  line-height: 1.2;
}

.chat-search,
.chat-input-row {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.chat-input-row {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.chatbox {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
}

.chat-send {
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #111827;
  padding: 0 14px;
  font-weight: 850;
}

.chat-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(2, 6, 23, 0.3);
  font-size: 1.2rem;
  line-height: 1;
}

.empty-state {
  text-align: center;
  color: var(--muted);
}

@media (max-width: 1024px) {
  .nav-links,
  .desktop-cta {
    display: none;
  }

  .hero-grid,
  .split-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .card-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1025px) {
  .mobile-trigger,
  .mobile-menu {
    display: none;
  }
}

@media (max-width: 680px) {
  :root {
    --page-inset: 12px;
  }

  .mobile-menu {
    width: min(100% - 24px, 1180px);
  }

  .page-section {
    padding: 64px 0;
  }

  .hero-section {
    min-height: auto;
    padding: 50px 0 40px;
  }

  .hero-meta,
  .card-grid,
  .card-grid.four,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .btn-primary,
  .btn-secondary,
  .btn-quiet {
    width: 100%;
  }

  .profile-photo-wrap {
    aspect-ratio: 1 / 1;
  }

  .hero-profile-card {
    margin-top: 0;
  }

  .home-project-items {
    grid-template-columns: 1fr;
  }

  .home-project-item,
  .home-project-item:nth-child(even) {
    border-right: 0;
  }

  .home-project-item:nth-child(n+2) {
    border-top: 1px solid var(--line);
  }

  .chat-button {
    right: 14px;
    bottom: 14px;
  }

  .chat-window {
    right: 14px;
    bottom: 84px;
  }
}
