/* MistX Tech — portfolio */
:root {
  --bg-deep: #07080c;
  --bg-elevated: #0e1018;
  --bg-card: #12151f;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eaef;
  --text-muted: #9aa3b2;
  --accent: #5eead4;
  --accent-dim: rgba(94, 234, 212, 0.15);
  --accent-strong: #2dd4bf;
  --font-sans: "Syne", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --max: 1120px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg-deep);
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  outline: 2px solid var(--text);
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 8, 12, 0.85);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}

.logo-mark {
  flex-shrink: 0;
  display: block;
  width: auto;
  height: 2rem;
  max-width: 4.5rem;
  object-fit: contain;
}

.logo-text {
  color: var(--text);
}

.logo-accent {
  color: var(--accent);
}

.logo:hover .logo-text {
  color: var(--text);
}

.logo:hover .logo-mark {
  filter: brightness(1.08);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.site-nav .nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.nav-cta {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text) !important;
}

.nav-cta:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .site-nav a {
    display: block;
    padding: 0.65rem 0;
  }
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 10vw, 7rem);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 10%, rgba(45, 212, 191, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(94, 234, 212, 0.06), transparent 50%),
    linear-gradient(180deg, var(--bg-deep) 0%, #0a0c11 100%);
  pointer-events: none;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 70%);
  opacity: 0.4;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5.5vw, 3.75rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}

.hero-title em {
  font-style: italic;
  color: var(--accent-strong);
}

.hero-lead {
  color: var(--text-muted);
  max-width: 42ch;
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
}

.quick-paths {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
}

.quick-path {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.quick-path:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(94, 234, 212, 0.06);
}

.quick-path-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
  background: var(--accent-dim);
  color: var(--accent-strong);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-strong), #14b8a6);
  color: var(--bg-deep);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
  color: var(--bg-deep);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  filter: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-full {
  width: 100%;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--border);
}

.hero-stats dt {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
}

.hero-stats dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

@media (max-width: 600px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }
}

.hero-panel {
  position: relative;
}

.code-window {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.code-window-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border);
}

.code-window-header span:nth-child(-n + 3) {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3f3f46;
}

.code-window-header span:nth-child(1) {
  background: #f87171;
}

.code-window-header span:nth-child(2) {
  background: #fbbf24;
}

.code-window-header span:nth-child(3) {
  background: #4ade80;
}

.code-window-title {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
}

.code-snippet {
  margin: 0;
  padding: 1.25rem 1.25rem 1.5rem;
  font-size: 0.8rem;
  line-height: 1.65;
  overflow-x: auto;
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
}

.code-snippet .kw {
  color: #c4b5fd;
}

.code-snippet .fn {
  color: #7dd3fc;
}

.code-snippet .name {
  color: #fde68a;
}

.code-snippet .str {
  color: #86efac;
}

.code-snippet .prop {
  color: #f9a8d4;
}

/* Sections */
.section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

#small-builds,
#local-business,
#about {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.section:nth-child(even of .section) {
  background: linear-gradient(180deg, transparent, rgba(94, 234, 212, 0.03) 40%, transparent);
}

.section-head {
  max-width: 52ch;
  margin-bottom: 2.75rem;
}

.section-head--narrow {
  margin-bottom: 2rem;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 400;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.section-lead {
  color: var(--text-muted);
  margin: 0;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-copy h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 400;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.about-lead,
.about-body {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 52ch;
}

.about-body {
  margin-bottom: 0;
}

.about-aside {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
}

.about-aside-title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.about-points {
  margin: 0 0 1.5rem;
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.about-points li {
  margin-bottom: 0.5rem;
}

.about-points li:last-child {
  margin-bottom: 0;
}

.about-cta {
  width: 100%;
}

/* Services */
.service-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 700px) {
  .service-grid {
    grid-template-columns: 1fr;
  }
}

.service-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  border-color: rgba(94, 234, 212, 0.35);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.08);
}

.service-icon {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.service-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.service-grid--paths {
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .service-grid--paths {
    grid-template-columns: repeat(2, 1fr);
    align-items: stretch;
  }
}

.service-card--featured {
  border-color: rgba(94, 234, 212, 0.35);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.12);
}

.service-intro {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.service-price {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--text);
}

.service-price strong {
  color: var(--accent-strong);
}

.service-subhead {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.path-examples {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.path-examples li {
  margin-bottom: 0.35rem;
}

.path-examples li:last-child {
  margin-bottom: 0;
}

.path-examples--inline {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.path-examples--inline li {
  margin: 0;
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.service-why {
  margin: 0 0 1.25rem;
  font-size: 0.93rem;
  color: var(--text-muted);
}

.service-why strong {
  color: var(--text);
}

.service-cta {
  display: inline-flex;
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.service-cta:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Work */
.work-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.work-item article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.75rem 1.5rem;
  transition: border-color 0.2s;
}

.work-item article:hover {
  border-color: rgba(94, 234, 212, 0.25);
}

.work-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.work-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.work-year {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.work-item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.work-item h3 a {
  color: var(--text);
  text-decoration: none;
}

.work-item h3 a:hover {
  color: var(--accent);
}

.work-inline-link {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.work-inline-link:hover {
  color: var(--accent);
}

.work-item .work-site {
  margin: 0.75rem 0 0;
}

.work-site-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.work-site-link:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.work-item p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.work-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.work-tech li {
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Process */
.process {
  border-block: 1px solid var(--border);
}

.process-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 700px) {
  .process-steps {
    grid-template-columns: 1fr;
  }
}

.process-steps > li {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-num {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
}

.process-steps h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.process-steps p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

@media (max-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-copy h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 400;
  margin: 0 0 1rem;
}

.contact-lead {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.contact-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-bullets li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.contact-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.field input,
.field textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: transparent;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field-full {
  grid-column: 1 / -1;
}

.contact-form .btn-full {
  grid-column: 1 / -1;
}

.form-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.form-note a {
  color: var(--accent-strong);
}

/* Footer */
.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.footer-logo {
  flex-shrink: 0;
  width: auto;
  height: 1.35rem;
  max-width: 3.25rem;
  object-fit: contain;
  display: block;
}

.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 1;
  min-width: 200px;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--accent);
}

@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-copy {
    order: 3;
  }
}
