:root {
  color-scheme: dark;
  --ink: #eef0e8;
  --progress: 0;
  --scene: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(118deg, rgba(124, 201, 255, 0.11), transparent 31%),
    linear-gradient(248deg, rgba(185, 154, 100, 0.06), transparent 36%),
    linear-gradient(180deg, #0b0d0f 0%, #111417 48%, #090b0d 100%);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before,
body::after,
.background-shade,
.scanline,
.cursor-light {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before,
body::after,
.background-shade,
.scanline {
  content: "";
}

body::before {
  z-index: -2;
  background:
    linear-gradient(121deg, transparent 0 38%, rgba(185, 154, 100, 0.04) 38% 38.28%, transparent 38.28% 100%),
    linear-gradient(68deg, transparent 0 64%, rgba(124, 201, 255, 0.06) 64% 64.22%, transparent 64.22% 100%),
    url("hex-hover-pattern.png");
  background-size: auto, auto, 28rem auto;
  background-position: center, center, center;
  mask-image: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), black 0 5.25rem, rgba(0, 0, 0, 0.3) 10.5rem, transparent 23rem);
  opacity: 0.72;
}

body::after {
  z-index: -1;
  background:
    linear-gradient(118deg, transparent 0 12%, rgba(124, 201, 255, 0.13) 12% 12.18%, transparent 12.18% 100%),
    linear-gradient(180deg, transparent 0 22%, rgba(0, 0, 0, 0.36) 100%),
    linear-gradient(90deg, rgba(124, 201, 255, 0.05), transparent 24%, transparent 76%, rgba(185, 154, 100, 0.03));
  background-position: left center, center, center;
  opacity: 0.92;
}

#neural-field {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
}

.background-shade {
  z-index: -4;
  background: #000;
}

.scanline {
  z-index: -2;
  background:
    linear-gradient(180deg, transparent, rgba(170, 133, 82, 0.052), transparent),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 5px);
  mix-blend-mode: overlay;
  opacity: 0.34;
}

.cursor-light {
  left: 0;
  top: 0;
  z-index: -1;
  width: 20rem;
  height: 20rem;
  background: radial-gradient(circle, rgba(124, 201, 255, 0.055), rgba(185, 154, 100, 0.018) 34%, transparent 68%);
  transform: translate3d(-50%, -50%, 0);
}

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

a:focus-visible {
  outline: 2px solid rgba(238, 240, 232, 0.82);
  outline-offset: 0.24rem;
}

.site-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1160px, calc(100% - clamp(2rem, 10vw, 8rem)));
  min-height: 130svh;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 5rem) 0 clamp(4rem, 10vw, 8rem);
  isolation: isolate;
}

.home-shell {
  padding-bottom: clamp(0.75rem, 2vh, 1.5rem);
}

.hero-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: clamp(20rem, 50svh, 36rem);
  padding-top: clamp(2rem, 8vh, 6rem);
}

.hero-row::before,
.hero-row::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.hero-row::before {
  display: none;
}

.hero-row::after {
  left: -8vw;
  bottom: clamp(1.5rem, 4vh, 4rem);
  width: min(64rem, 100vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 201, 255, 0.72), transparent);
  box-shadow: 0 0 36px rgba(124, 201, 255, 0.42), 0 7px 0 rgba(170, 133, 82, 0.12);
  transform: rotate(-10deg) translateX(calc(var(--progress) * -80px));
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 100%;
}

h1,
p {
  margin-top: 0;
}

h1 {
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  position: relative;
  display: inline-block;
  max-width: none;
  margin-bottom: 0;
  padding-right: 0.08em;
  color: transparent;
  font-size: clamp(2.15rem, 11.4vw, 9.6rem);
  line-height: 0.8;
  white-space: nowrap;
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(251, 253, 247, 1), rgba(195, 204, 200, 0.86)),
    repeating-linear-gradient(0deg, transparent 0 0.09em, rgba(8, 10, 9, 0.7) 0.09em 0.105em);
  background-clip: text;
  text-shadow:
    0 0 42px rgba(124, 201, 255, 0.16),
    0.02em 0 rgba(124, 201, 255, 0.22),
    -0.018em 0 rgba(185, 154, 100, 0.16);
}

h1::before,
h1::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

h1::before {
  inset: 0;
  color: rgba(124, 201, 255, 0.2);
  content: attr(data-text);
  clip-path: polygon(0 10%, 100% 8%, 100% 20%, 0 24%);
  transform: translateX(calc(-0.02em + var(--scene) * 0.035em));
  animation: signalSlice 5.8s steps(2, end) infinite;
}

h1::after {
  right: -0.1em;
  bottom: 0.05em;
  left: 0.02em;
  height: 0.08em;
  background: linear-gradient(90deg, rgba(124, 201, 255, 0.42), transparent 76%);
  box-shadow: 0 0 18px rgba(124, 201, 255, 0.26);
  transform: translateX(calc(var(--progress) * -64px));
}

.social-links {
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: clamp(1rem, 2.5vw, 2rem);
}

.social-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  color: rgba(238, 240, 232, 0.62);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(0.68rem, 1.05vw, 0.78rem);
  font-weight: 430;
  text-transform: uppercase;
  padding-left: 1.15rem;
  transition: color 180ms ease, transform 180ms ease, text-shadow 180ms ease, opacity 180ms ease;
}

.social-links a::after {
  position: absolute;
  left: 0;
  width: 0;
  height: 0;
  border: 0 solid transparent;
  background: transparent;
  content: "";
  opacity: 0;
  transform: rotate(45deg) scale(0);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease, transform 180ms ease, width 180ms ease, height 180ms ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  color: rgba(238, 240, 232, 0.86);
  text-shadow:
    0 0 14px rgba(124, 201, 255, 0.3),
    0 0 30px rgba(124, 201, 255, 0.14);
  transform: translateX(0.16rem);
}

.social-links a:hover::after,
.social-links a:focus-visible::after {
  width: 0.38rem;
  height: 0.38rem;
  border-width: 1px;
  background: transparent;
  border-color: rgba(124, 201, 255, 0.86);
  box-shadow: none;
  opacity: 0.92;
  transform: rotate(45deg) scale(1);
}

.projects-row {
  position: relative;
  margin-top: clamp(12rem, 34vh, 24rem);
  padding: clamp(4rem, 10vh, 8rem) 0 0;
}

.projects-row::before,
.projects-row::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.projects-row::before {
  inset: 2rem -10vw auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(238, 240, 232, 0.18), transparent);
  transform: translateX(calc((var(--scene) - 0.5) * 100px));
}

.projects-row::after {
  display: none;
}

.project-grid {
  display: flex;
  max-width: min(34rem, 100%);
  transform: translateY(-0.45rem);
}

.project-card {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  width: min(28rem, 100%);
  gap: 0;
  padding: 0.86rem 1.35rem 0.86rem 0;
  border-top: 1px solid rgba(238, 240, 232, 0.15);
  border-bottom: 1px solid rgba(238, 240, 232, 0.08);
  background: transparent;
  overflow: hidden;
  transition:
    transform 360ms cubic-bezier(0.16, 1, 0.3, 1),
    background 360ms ease,
    box-shadow 360ms ease;
}

.project-card::before,
.project-card::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.project-card::before {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(124, 201, 255, 0.08), transparent 32%),
    linear-gradient(115deg, transparent 0 70%, rgba(170, 133, 82, 0.09) 70% 70.4%, transparent 70.4%);
  opacity: 1;
  transition: opacity 360ms ease;
}

.project-card::after {
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background: rgba(124, 201, 255, 0.34);
  box-shadow: 0 0 14px rgba(124, 201, 255, 0.18);
  transform: scaleY(1);
  transform-origin: top;
  transition:
    background 360ms ease,
    box-shadow 360ms ease,
    transform 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card > * {
  position: relative;
  z-index: 1;
  padding-inline: 1.2rem 0.2rem;
}

.project-card p {
  align-self: end;
  margin-bottom: 0;
  color: #c4c9c1;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  opacity: 0.72;
  transform: translateX(0);
  transition:
    opacity 360ms ease,
    transform 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover,
.project-card:focus-visible {
  background: rgba(238, 240, 232, 0.025);
  box-shadow: 0 0 18px rgba(124, 201, 255, 0.055);
  transform: translateX(10px);
}

.project-card:hover p,
.project-card:focus-visible p {
  opacity: 0.72;
  text-shadow:
    0 0 14px rgba(124, 201, 255, 0.28),
    0 0 30px rgba(124, 201, 255, 0.12);
  transform: translateX(0);
}

.project-card:hover::before,
.project-card:focus-visible::before {
  opacity: 1;
}

.project-card:hover::after,
.project-card:focus-visible::after {
  background: rgba(124, 201, 255, 0.94);
  box-shadow:
    0 0 22px rgba(124, 201, 255, 0.95),
    0 0 54px rgba(124, 201, 255, 0.62),
    0 0 82px rgba(124, 201, 255, 0.24);
  transform: scaleY(1);
}

.site-footer {
  align-self: center;
  margin-top: clamp(18rem, 48vh, 32rem);
  padding: 0;
}

.back-link {
  color: rgba(238, 240, 232, 0.62);
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 400;
  text-transform: uppercase;
  transition: color 180ms ease, text-shadow 180ms ease;
}

.back-link:hover,
.back-link:focus-visible,
.policy-content a:hover,
.policy-content a:focus-visible {
  color: rgba(238, 240, 232, 0.62);
  text-shadow:
    0 0 14px rgba(124, 201, 255, 0.28),
    0 0 30px rgba(124, 201, 255, 0.12);
}

.policy-shell {
  width: min(920px, calc(100% - clamp(2rem, 10vw, 8rem)));
  min-height: 100svh;
  margin: 0 auto;
  padding-bottom: clamp(5rem, 10vw, 8rem);
}

.plain-policy-page {
  background: #090b0d;
  color: rgba(238, 240, 232, 0.62);
}

.plain-policy-page::before,
.plain-policy-page::after {
  display: none;
}

.policy-content {
  max-width: 48rem;
  padding-top: clamp(3rem, 7vw, 6rem);
}

.policy-content h1 {
  display: block;
  margin-top: clamp(2rem, 5vw, 4rem);
  margin-bottom: 1.15rem;
  padding-right: 0;
  color: rgba(238, 240, 232, 0.62);
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(1.55rem, 4.2vw, 2.75rem);
  font-weight: 500;
  line-height: 1;
  background: none;
  text-shadow: none;
  white-space: normal;
}

.policy-content h1::before,
.policy-content h1::after {
  display: none;
}

.policy-date {
  margin-bottom: clamp(3rem, 8vw, 5rem);
  color: rgba(238, 240, 232, 0.62);
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
}

.policy-content section {
  margin-top: 2.65rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(124, 201, 255, 0.12);
}

.policy-content h2 {
  margin: 0 0 0.75rem;
  color: rgba(238, 240, 232, 0.62);
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
}

.policy-content p {
  max-width: 44rem;
  margin-bottom: 0.95rem;
  color: rgba(238, 240, 232, 0.62);
  font-size: clamp(0.9rem, 1.15vw, 1rem);
  line-height: 1.75;
}

.policy-content a {
  color: rgba(238, 240, 232, 0.62);
  text-decoration: underline;
  text-decoration-color: rgba(238, 240, 232, 0.32);
  text-underline-offset: 0.18em;
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 56px, 0) skewY(1.4deg) scale(0.99);
  filter: blur(10px);
  transition:
    opacity 900ms ease,
    transform 900ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 900ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, calc(var(--scene) * -12px), 0) skewY(0) scale(1);
  filter: blur(0);
}

@keyframes signalSlice {
  0%,
  86%,
  100% {
    clip-path: polygon(0 10%, 100% 8%, 100% 20%, 0 24%);
    transform: translateX(-0.018em);
  }
  88% {
    clip-path: polygon(0 48%, 100% 45%, 100% 55%, 0 58%);
    transform: translateX(0.026em);
  }
  90% {
    clip-path: polygon(0 72%, 100% 70%, 100% 82%, 0 84%);
    transform: translateX(-0.012em);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .cursor-light,
  .scanline {
    display: none;
  }

  body::before {
    mask-image: none;
    opacity: 0.16;
  }

  .hero-row::after,
  h1::before,
  h1::after {
    display: none;
  }

  .reveal,
  .reveal.is-visible {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@media (forced-colors: active) {
  body {
    background: Canvas;
    color: CanvasText;
  }

  body::before,
  body::after,
  .background-shade,
  .scanline,
  .cursor-light,
  #neural-field,
  .hero-row::after,
  h1::before,
  h1::after,
  .project-card::before,
  .project-card::after,
  .social-links a::after {
    display: none;
  }

  h1 {
    color: CanvasText;
    background: none;
    text-shadow: none;
  }

  a:focus-visible {
    outline: 2px solid Highlight;
  }

  .project-card {
    border: 1px solid LinkText;
  }
}
