:root {
  --bg: #0b0b0b;
  --fg: #f5f5f3;
  --muted: #9a9a9a;
  --border: #272727;
  --card-bg: #151515;
  --focus-accent: #0099ff;
  --side: 44px;
  --section-y: 100px;
  --max-width: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: 100;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: var(--bg);
  background: var(--fg);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.hero,
.section-dark,
.contact,
.site-footer {
  width: min(100%, var(--max-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  padding: 20px var(--side);
  border-bottom: 1px solid var(--border);
  background: rgba(11, 11, 11, 0.94);
  backdrop-filter: blur(12px);
}

.logo {
  font-family: "Orbitron", sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
}

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

.site-nav a,
.section-label,
.section-kicker,
.project-number,
.project-meta,
.note,
.site-footer {
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav a {
  color: var(--muted);
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current] {
  color: var(--fg);
}

.hero {
  position: relative;
  display: flex;
  min-height: 700px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 72px var(--side) 52px;
  border-bottom: 1px solid var(--border);
}

.technical-grid::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  background-image: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc(16.666% - 1px),
    rgba(154, 154, 154, 0.11) calc(16.666% - 1px),
    rgba(154, 154, 154, 0.11) 16.666%
  );
}

.hero > * {
  position: relative;
  z-index: 1;
}

.section-kicker {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.hero h1 {
  max-width: 1190px;
  margin: 32px 0 24px;
  font-size: clamp(90px, 13.125vw, 168px);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.07em;
}

.hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.hero-bottom p {
  max-width: 470px;
  margin: 0;
  color: #c2c2c0;
  font-size: 19px;
  line-height: 1.35;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 13px 20px;
  border: 1px solid currentColor;
  border-radius: 0;
  cursor: pointer;
  font-family: "Orbitron", sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 180ms ease, background-color 180ms ease;
}

.button-light {
  border-color: var(--fg);
  color: var(--bg);
  background: var(--fg);
}

.button-light:hover,
.button-light:focus-visible {
  color: var(--fg);
  background: var(--bg);
}

.section-dark {
  padding: var(--section-y) var(--side);
  border-bottom: 1px solid var(--border);
}

.section-label {
  margin: 0;
  color: var(--muted);
}

h2 {
  margin: 0;
  font-size: 72px;
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.065em;
}

.projects {
  padding-bottom: 100px;
}

.projects h2 {
  max-width: 780px;
  margin: 42px 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(360px, 1fr));
  gap: 1px;
  background: var(--border);
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  overflow: hidden;
  background: var(--card-bg);
  transition: background-color 220ms ease;
}

.project-card:hover {
  background: #1b1b1b;
}

.project-number,
.project-meta {
  margin: 0;
  color: var(--muted);
}

.project-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-main h3 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(32px, 3.75vw, 48px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.project-main p {
  max-width: 470px;
  margin: 0;
  color: #b7b7b5;
  font-size: 17px;
  line-height: 1.35;
}

.contact {
  min-height: 632px;
  padding: var(--section-y) var(--side);
  color: var(--bg);
  background: var(--fg);
}

.contact .section-label {
  color: #5d5d5d;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 610px) minmax(320px, 420px);
  justify-content: start;
  gap: 80px;
  margin-top: 42px;
}

.contact-intro h2 {
  max-width: 610px;
}

.contact-intro > p {
  max-width: 480px;
  margin: 34px 0 0;
  color: #4c4c4c;
  font-size: 18px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field label {
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0 2px 9px;
  border: 0;
  border-bottom: 1px solid var(--bg);
  border-radius: 0;
  outline: 1px solid transparent;
  outline-offset: 7px;
  color: var(--bg);
  background: transparent;
  font-size: 17px;
  line-height: 1.2;
  transition: outline-color 160ms ease;
}

.field textarea {
  min-height: 120px;
  padding-top: 5px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline-color: var(--focus-accent);
}

.button-dark {
  align-self: flex-start;
  margin-top: 0;
  border-color: var(--bg);
  color: var(--fg);
  background: var(--bg);
}

.button-dark:hover,
.button-dark:focus-visible {
  color: var(--bg);
  background: transparent;
}

.form-status {
  min-height: 1.4em;
  margin: 0;
  color: #4c4c4c;
  font-size: 14px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 22px var(--side);
  color: var(--muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.footer-links a {
  transition: color 180ms ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--fg);
}

.footer-links svg {
  display: block;
  width: 16px;
  fill: currentColor;
}

:focus-visible {
  outline: 2px solid var(--focus-accent);
  outline-offset: 4px;
}

@media (max-width: 900px) {
  :root {
    --side: 20px;
    --section-y: 72px;
  }

  .site-header {
    height: 58px;
    padding-block: 18px;
  }

  .site-nav {
    gap: 18px;
  }

  .hero {
    min-height: 634px;
    padding-top: 46px;
    padding-bottom: 40px;
  }

  .technical-grid::before {
    background-image: repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(20% - 1px),
      rgba(154, 154, 154, 0.11) calc(20% - 1px),
      rgba(154, 154, 154, 0.11) 20%
    );
  }

  .hero h1 {
    margin: 30px 0 22px;
    font-size: clamp(52px, 16.4vw, 82px);
    line-height: 0.88;
    letter-spacing: -0.06em;
  }

  .hero-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 26px;
  }

  .hero-bottom p {
    max-width: 490px;
    font-size: 18px;
  }

  h2 {
    font-size: 52px;
    line-height: 0.92;
    letter-spacing: -0.055em;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 46px;
    margin-top: 42px;
  }

  .projects h2 {
    margin-block: 42px 32px;
  }

  .project-main h3 {
    font-size: 48px;
  }

  .contact {
    min-height: 0;
  }

  .contact-intro > p {
    margin-top: 28px;
  }

  .site-footer {
    min-height: 58px;
    padding-block: 20px;
  }
}

@media (max-width: 700px) {
  .project-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .project-card {
    min-height: 340px;
  }
}

@media (max-width: 520px) {
  .logo {
    font-size: 19px;
  }

  .site-nav {
    gap: 14px;
  }

  .site-nav a {
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .hero h1 {
    font-size: 64px;
  }

  .project-card {
    min-height: 381px;
  }

  .site-footer {
    font-size: 9px;
  }
}

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

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