:root {
  --bg: #161826;
  --surface: #232532;
  --surface-soft: #191b2b;
  --text: #e9e9ed;
  --muted: #b8b8c2;
  --accent: #9184d9;
  --accent-light: #d2cefd;
  --divider: rgba(233, 233, 237, 0.16);
  --section: #262a60;
  --radius: 8px;
  --container: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent-light);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 3px;
}

::selection {
  background: rgba(145, 132, 217, 0.35);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 520;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

h1 {
  max-width: 18ch;
  font-size: clamp(2.45rem, 5.6vw, 4.65rem);
}

h2 {
  max-width: 25ch;
  font-size: clamp(1.8rem, 3vw, 2.25rem);
}

h3 {
  font-size: 1.18rem;
  letter-spacing: -0.012em;
}

.text-accent {
  color: var(--accent-light);
}

p {
  margin: 0;
}

.container {
  width: min(100% - 64px, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--accent-light);
  color: var(--bg);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--divider);
  background: rgba(22, 24, 38, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  width: min(100% - 64px, var(--container));
  min-height: 76px;
  margin-inline: auto;
  gap: 28px;
}

.brand {
  display: grid;
  margin-right: auto;
  color: var(--text);
  line-height: 1.1;
}

.brand span {
  font-size: 0.95rem;
  font-weight: 600;
}

.brand small {
  margin-top: 5px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.64rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.desktop-nav a {
  color: var(--muted);
  font-size: 0.88rem;
}

.desktop-nav a:hover {
  color: var(--text);
}

.mobile-menu {
  display: none;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.2;
  text-align: center;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

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

.button-primary {
  border-color: var(--accent);
  color: var(--accent-light);
}

.button-primary:hover {
  background: rgba(145, 132, 217, 0.12);
  color: #fff;
}

.button-ghost {
  color: var(--accent-light);
}

.button-ghost:hover {
  background: rgba(145, 132, 217, 0.1);
  color: #fff;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  position: absolute;
  inset: -200px -20% auto auto;
  width: 680px;
  height: 680px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(76, 83, 151, 0.24), transparent 68%);
  content: "";
  pointer-events: none;
}

.hero-inner {
  position: relative;
  padding-block: clamp(92px, 13vw, 152px);
}

.eyebrow,
.section-label,
.card-index,
.service-type,
.stack-label,
.site-footer {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.eyebrow,
.section-label {
  color: var(--accent-light);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 30px;
}

.hero-copy {
  max-width: 68ch;
  margin-top: 28px;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  line-height: 1.72;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.section {
  padding-block: clamp(72px, 9vw, 96px);
}

.section-bordered {
  border-top: 1px solid var(--divider);
}

.section-tinted {
  background: linear-gradient(180deg, var(--surface-soft), var(--bg));
}

.section-heading {
  margin-bottom: 46px;
}

.section-label {
  margin-bottom: 22px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(300px, 0.86fr);
  gap: clamp(48px, 8vw, 92px);
  align-items: start;
}

.section-copy h2 {
  margin-bottom: 28px;
}

.section-copy > p:not(.section-label) {
  max-width: 65ch;
  margin-bottom: 18px;
  color: var(--muted);
}

.profile {
  display: grid;
  gap: 20px;
}

.portrait {
  aspect-ratio: 4 / 5;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background: var(--surface);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.facts {
  display: grid;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
}

.facts div {
  padding: 16px 18px;
}

.facts div + div {
  border-top: 1px solid var(--divider);
}

.facts dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  font-size: 0.9rem;
}

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

.approach-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  column-gap: clamp(36px, 8vw, 110px);
  align-items: end;
}

.approach-heading .section-label,
.approach-heading h2 {
  grid-column: 1;
}

.approach-heading > p:last-child {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.card {
  display: grid;
  align-content: start;
  gap: 13px;
  min-height: 100%;
  padding: 26px 24px;
  border: 1px solid rgba(233, 233, 237, 0.12);
  border-radius: var(--radius);
  background: var(--surface);
}

.card-index {
  color: var(--accent-light);
  font-size: 0.7rem;
}

.card p,
.service p {
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.65;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: auto;
  padding-top: 5px;
}

.card-link {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  color: var(--accent-light);
  font-size: 0.76rem;
  font-weight: 600;
}

.card-link span,
.contact-insight-link span {
  transition: transform 160ms ease;
}

.card-link:hover span,
.contact-insight-link:hover span {
  transform: translateX(3px);
}

.stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 34px;
}

.stack span:not(.stack-label) {
  padding: 4px 10px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent-light);
  font-size: 0.72rem;
}

.stack-label {
  margin-right: 8px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.security-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(52px, 9vw, 104px);
  align-items: start;
}

.security-intro {
  position: sticky;
  top: 120px;
}

.security-intro h2 {
  margin-bottom: 24px;
}

.security-intro > p:last-child {
  max-width: 58ch;
  color: var(--muted);
}

.security-points {
  display: grid;
  border-block: 1px solid var(--divider);
}

.security-points article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 18px;
  padding-block: 24px;
}

.security-points article + article {
  border-top: 1px solid var(--divider);
}

.security-points article > span {
  color: var(--accent-light);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
}

.security-points h3 {
  margin-bottom: 8px;
}

.security-points p {
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.65;
}

.services {
  border-block: 1px solid var(--divider);
}

.service {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 40px;
  padding-block: 26px;
}

.service + .service {
  border-top: 1px solid var(--divider);
}

.service-type {
  padding-top: 2px;
  color: var(--accent-light);
  font-size: 0.73rem;
  letter-spacing: 0.04em;
}

.service h3 {
  margin-bottom: 8px;
}

.service p {
  max-width: 65ch;
}

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

.products-heading h2 {
  max-width: none;
}

.products-intro {
  max-width: 78ch;
  margin-top: 22px;
  padding-left: 18px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  line-height: 1.72;
}

.product-card {
  --product-padding: clamp(24px, 4vw, 34px);
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  padding: var(--product-padding);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0, rgba(145, 132, 217, 0.12), transparent 36%),
    var(--surface);
}

.product-preview {
  position: relative;
  display: block;
  flex: 0 0 auto;
  aspect-ratio: 2.06 / 1;
  margin: calc(var(--product-padding) * -1) calc(var(--product-padding) * -1) 28px;
  overflow: hidden;
  border-bottom: 1px solid var(--divider);
  background: #0e1117;
}

.product-preview::after {
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  background: linear-gradient(180deg, transparent 62%, rgba(14, 17, 23, 0.32));
  content: "";
  pointer-events: none;
}

.product-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease, filter 320ms ease;
}

.product-preview:hover img {
  filter: brightness(1.08);
  transform: scale(1.025);
}

.product-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  margin-bottom: 24px;
}

.product-name {
  color: var(--accent-light);
  font-size: 1.05rem;
  font-weight: 650;
}

.product-type {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.product-card h3 {
  max-width: 28ch;
  margin-bottom: 15px;
  font-size: clamp(1.18rem, 1.7vw, 1.42rem);
}

.product-card > p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.product-features {
  display: grid;
  gap: 9px;
  margin: 24px 0 30px;
  padding: 0;
  color: #d7d7df;
  font-size: 0.83rem;
  list-style: none;
}

.product-features li {
  position: relative;
  padding-left: 18px;
}

.product-features li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
  transform: translateY(-50%);
}

.product-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: auto;
  color: var(--accent-light);
  font-size: 0.88rem;
  font-weight: 600;
}

.product-link span {
  transition: transform 160ms ease;
}

.product-link:hover span {
  transform: translateX(3px);
}

.contact {
  padding-block: clamp(72px, 9vw, 92px);
  background: linear-gradient(180deg, var(--section), #1e2148);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
}

.contact h2 {
  max-width: 24ch;
}

.contact p {
  max-width: 56ch;
  margin-top: 16px;
  color: #d5d5dd;
  font-size: 1.05rem;
}

.contact .contact-insight {
  max-width: 64ch;
  margin-top: 28px;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--accent-light);
  color: rgba(233, 233, 237, 0.78);
  font-size: 0.96rem;
}

.contact-insight strong {
  display: block;
  margin-bottom: 5px;
  color: var(--accent-light);
  font-size: 1.02rem;
  font-weight: 600;
}

.contact-insight-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--accent-light);
  font-size: 0.82rem;
  font-weight: 600;
}

.contact-actions {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.site-footer {
  border-top: 1px solid var(--divider);
  color: rgba(233, 233, 237, 0.52);
  font-size: 0.7rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-block: 26px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

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

  .mobile-menu {
    position: relative;
    display: block;
  }

  .mobile-menu summary {
    min-width: 66px;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid var(--divider);
    border-radius: var(--radius);
    color: var(--accent-light);
    font-size: 0.85rem;
    list-style: none;
    cursor: pointer;
  }

  .mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: grid;
    width: min(280px, calc(100vw - 32px));
    overflow: hidden;
    border: 1px solid var(--divider);
    border-radius: var(--radius);
    background: #1c1e2d;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
  }

  .mobile-menu nav a {
    min-height: 48px;
    padding: 12px 16px;
    color: var(--text);
  }

  .mobile-menu nav a + a {
    border-top: 1px solid var(--divider);
  }

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

  .approach-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .product-card:last-child {
    grid-column: 1 / -1;
    width: calc(50% - 10px);
    justify-self: center;
  }
}

@media (max-width: 740px) {
  .container,
  .header-inner {
    width: min(100% - 40px, var(--container));
  }

  .about-grid,
  .security-panel,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .approach-heading {
    grid-template-columns: 1fr;
  }

  .approach-heading > p:last-child {
    grid-column: 1;
    grid-row: auto;
    max-width: 62ch;
    margin-top: 18px;
  }

  .approach-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    gap: 42px;
  }

  .security-panel {
    gap: 36px;
  }

  .security-intro {
    position: static;
  }

  .profile {
    width: min(100%, 430px);
  }

  .contact-grid {
    align-items: start;
    gap: 32px;
  }

  .contact-actions {
    width: 100%;
  }

  .contact-actions .button-primary {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-card:last-child {
    grid-column: auto;
    width: 100%;
    justify-self: stretch;
  }
}

@media (max-width: 560px) {
  html {
    scroll-padding-top: 76px;
  }

  .container,
  .header-inner {
    width: min(100% - 32px, var(--container));
  }

  .header-inner {
    min-height: 68px;
  }

  .brand span {
    font-size: 0.88rem;
  }

  .hero-inner {
    padding-block: 72px 82px;
  }

  h1 {
    font-size: clamp(2.2rem, 11.5vw, 3.1rem);
  }

  .eyebrow {
    max-width: 30ch;
    margin-bottom: 24px;
    line-height: 1.7;
  }

  .hero-copy {
    margin-top: 24px;
  }

  .button-row {
    display: grid;
    margin-top: 30px;
  }

  .button-row .button {
    width: 100%;
  }

  .section {
    padding-block: 68px;
  }

  .section-heading {
    margin-bottom: 34px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 22px 20px;
  }

  .stack-label {
    width: 100%;
    margin-bottom: 2px;
  }

  .service {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .service-type {
    padding: 0;
  }

  .footer-inner {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
