:root {
  --black: #000000;
  --white: #e6e6e6;
  --muted: rgba(230, 230, 230, 0.32);
  --line: rgba(230, 230, 230, 0.14);
  --font: "Inter", system-ui, sans-serif;
}

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

html,
body {
  height: 100%;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  cursor: auto;
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(230, 230, 230, 0.16);
  color: var(--white);
}

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

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

canvas#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
  pointer-events: none;
}

.titles {
  position: fixed;
  left: 50%;
  bottom: 50%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  margin-bottom: 112px;
  transform: translateX(-50%);
  pointer-events: none;
  text-align: left;
}

.line {
  font-family: inherit;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.15;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity 2.8s ease, transform 2.8s ease, max-height 2.4s ease;
}

.line.is-on {
  max-height: 1.3em;
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.line.is-on.is-gone {
  opacity: 0;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  cursor: auto;
}

.overlay.is-on {
  pointer-events: auto;
}

.contact-form {
  width: min(220px, 72vw);
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
}

.contact-form.is-on {
  opacity: 1;
  transition: opacity 2s ease;
}

.hp {
  display: none;
}

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

.field span {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(230, 230, 230, 0.28);
}

.field input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(230, 230, 230, 0.12);
  color: rgba(230, 230, 230, 0.82);
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  padding: 3px 0 7px;
  border-radius: 0;
  outline: none;
  cursor: text;
  caret-color: var(--white);
}

.field input:focus {
  border-bottom-color: rgba(230, 230, 230, 0.4);
}

.field input.is-fault {
  animation: line-blink 2.2s ease 0s 1;
}

@keyframes line-blink {
  0%,
  100% {
    border-bottom-color: rgba(230, 230, 230, 0.12);
  }
  40% {
    border-bottom-color: rgba(255, 255, 255, 0.95);
  }
}

.form-actions {
  margin-top: 2px;
}

.send {
  background: none;
  border: 0;
  color: rgba(230, 230, 230, 0.45);
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  padding: 0;
}

.send:hover {
  color: var(--white);
}

.thanks {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  color: rgba(230, 230, 230, 0.55);
}

.thanks.is-on {
  opacity: 1;
  transition: opacity 1.4s ease;
}

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 24px;
  font-size: 12px;
  font-weight: 400;
  color: rgba(230, 230, 230, 0.28);
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.site-footer a:hover {
  color: var(--white);
}

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

.back {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 8;
  font-size: 12px;
  font-weight: 400;
  color: rgba(230, 230, 230, 0.36);
  text-decoration: none;
  cursor: pointer;
}

.back:hover {
  color: var(--white);
}

.portfolio {
  position: relative;
  z-index: 3;
  min-height: 100%;
  overflow: auto;
  padding: 14vh 8vw 18vh;
}

body.page-portfolio {
  overflow: auto;
  height: auto;
  min-height: 100%;
}

html:has(body.page-portfolio) {
  overflow: auto;
  height: auto;
}

.portfolio-title {
  font-size: 15px;
  font-weight: 400;
  margin-bottom: 7vh;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 40px 28px;
}

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.card .preview {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #080808;
  border: 1px solid rgba(230, 230, 230, 0.08);
  overflow: hidden;
  margin-bottom: 12px;
}

.card .preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.9;
  transition: opacity 0.6s ease;
}

.card:hover .preview img {
  opacity: 1;
}

.card h3 {
  font-weight: 400;
  font-size: 13px;
}

.card p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.abstract {
  position: absolute;
  inset: 0;
}

.abstract .glow {
  position: absolute;
  width: 36%;
  height: 36%;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(230, 230, 230, 0.1), transparent 70%);
}

.abstract .dot {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}

.abstract.lines .bar {
  position: absolute;
  left: 12%;
  height: 1px;
  background: rgba(230, 230, 230, 0.16);
}

.abstract.blocks .blk {
  position: absolute;
  background: rgba(230, 230, 230, 0.05);
  border: 1px solid rgba(230, 230, 230, 0.06);
}

.empty {
  font-size: 15px;
  color: rgba(230, 230, 230, 0.5);
  max-width: 18ch;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .site-footer {
    padding: 16px 18px 20px;
    font-size: 11px;
  }

  .footer-links {
    gap: 14px;
  }

  .back {
    top: 18px;
    left: 18px;
  }

  .portfolio {
    padding: 12vh 6vw 16vh;
  }

  .titles {
    width: 90vw;
    margin-bottom: 88px;
  }

  .line {
    font-size: 16px;
    white-space: normal;
  }
}
