:root {
  --ink: #05070c;
  --ink-2: #0a1018;
  --blue: #0082d1;
  --gold: #ffd100;
  --gold-2: #ffe56a;
  --gold-dim: rgba(0, 130, 209, 0.22);
  --ivory: #f4f1ea;
  --muted: #9aa3ad;
  --line: rgba(255, 209, 0, 0.38);
  --danger: #d7a08f;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(1.25rem, 4vw, 3.5rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  background: var(--ink);
  color: var(--ivory);
  -webkit-text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: 0.01em;
  background: var(--ink);
  overflow-x: hidden;
  cursor: none;
  color-scheme: dark;
}

body.is-touch,
body.is-touch * {
  cursor: auto;
}

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

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

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 50;
  background: var(--ink);
  color: var(--gold);
  padding: 0.6rem 1rem;
  cursor: pointer;
}

#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.grain,
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.grain {
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.vignette {
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(5, 5, 7, 0.55) 100%),
    linear-gradient(180deg, rgba(5, 5, 7, 0.18), transparent 18%, transparent 82%, rgba(5, 5, 7, 0.45));
}

.cursor,
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}

.cursor {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(0, 130, 209, 0.75);
  opacity: 0;
  transition: width 0.25s var(--ease), height 0.25s var(--ease), background 0.25s var(--ease), opacity 0.25s;
}

.cursor.is-on,
.cursor-dot.is-on {
  opacity: 1;
}

.cursor.is-hover {
  width: 64px;
  height: 64px;
  background: rgba(0, 130, 209, 0.1);
}

.cursor-dot {
  width: 5px;
  height: 5px;
  background: var(--gold-2);
  opacity: 0;
}

body.is-touch .cursor,
body.is-touch .cursor-dot,
body.cursor-hidden .cursor,
body.cursor-hidden .cursor-dot {
  opacity: 0;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: #05070c;
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}

.loader.is-gone {
  opacity: 0;
  visibility: hidden;
}

.loader-mark {
  width: min(168px, 56vw);
  height: auto;
  margin-bottom: 2.4rem;
  animation: breathe 2.4s ease-in-out infinite;
}

.loader-bar {
  position: absolute;
  bottom: 18%;
  left: 50%;
  width: min(220px, 50vw);
  height: 1px;
  background: rgba(0, 130, 209, 0.22);
  transform: translateX(-50%);
  overflow: hidden;
}

.loader-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
  animation: load 1.35s var(--ease) forwards;
}

.dots {
  position: fixed;
  right: clamp(0.8rem, 2vw, 1.6rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dots a {
  width: 9px;
  height: 9px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
}

.dots a.is-active {
  background: var(--gold);
}

.dots span {
  position: absolute;
  right: 1.4rem;
  white-space: nowrap;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}

.dots a:hover span,
.dots a:focus-visible span {
  opacity: 1;
  transform: none;
}

.screen {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: calc(2.2rem + env(safe-area-inset-top)) var(--pad) calc(2rem + env(safe-area-inset-bottom));
}

.eyebrow {
  margin: 0 0 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 500;
  margin: 0;
}

.hero {
  display: grid;
  place-items: center;
  text-align: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-wrap {
  position: relative;
  width: min(280px, 72vw);
  margin-bottom: 0.2rem;
}

.logo {
  width: 100%;
  height: auto;
  display: block;
  animation: rise 1.4s var(--ease) both;
}

.gold-rule {
  display: block;
  width: 52px;
  height: 1px;
  margin: 1.15rem 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: rule 1.2s 0.35s var(--ease) both;
}

.hero-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.6vw, 1.85rem);
  font-style: italic;
  font-weight: 400;
  color: var(--ivory);
  letter-spacing: 0.04em;
  min-height: 2.4em;
  max-width: 22ch;
  display: grid;
  place-items: center;
  animation: rise 1.4s 0.22s var(--ease) both;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.hero-title.is-out {
  opacity: 0;
  transform: translateY(10px);
}

.scroll-cue {
  position: absolute;
  bottom: calc(1.4rem + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.scroll-cue i {
  width: 1px;
  height: 42px;
  background: linear-gradient(var(--gold), transparent);
  animation: drip 1.8s ease-in-out infinite;
}

.projects {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.4rem;
}

.section-head h2,
.contact-copy h2 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  letter-spacing: 0.04em;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.85rem;
  flex: 1;
  min-height: 0;
}

.project {
  position: relative;
  overflow: hidden;
  min-height: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 130, 209, 0.18);
  background: #071018;
  cursor: none;
}

.project--help {
  background: radial-gradient(ellipse at 50% 38%, #2a2148 0%, #071018 68%);
}

.project--drpvi {
  background: radial-gradient(ellipse at 50% 38%, #12343c 0%, #071018 68%);
}

.project--iea {
  background: radial-gradient(ellipse at 50% 38%, #1a2248 0%, #071018 68%);
}

.project-logo {
  width: min(48%, 176px);
  position: relative;
  z-index: 1;
  margin-bottom: 3.2rem;
}

.project-logo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.7s var(--ease);
}

.project--iea .project-logo {
  width: min(46%, 190px);
  margin-bottom: 2.2rem;
}

.project--iea .project-logo img {
  mix-blend-mode: screen;
}

.project::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(5, 7, 12, 0.88) 100%);
  pointer-events: none;
}

.project-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 1.1rem 1.15rem 1.05rem;
}

.project-meta span,
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.status.is-dev {
  color: var(--blue);
}

.status.is-dev::before {
  animation: pulse 1.8s ease-in-out infinite;
}

.project-meta h3 {
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
}

.project-meta p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 300;
  max-width: 34ch;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.project-meta em {
  display: block;
  margin-top: 0.35rem;
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(244, 241, 234, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project:hover .project-logo img,
.project:focus-within .project-logo img {
  transform: scale(1.06);
}

.project:hover .project-meta p,
.project:focus-within .project-meta p {
  opacity: 1;
  transform: none;
}

.project-dev {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex: 0 0 auto;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(0, 130, 209, 0.18);
  background: rgba(7, 16, 24, 0.55);
  cursor: none;
  max-width: min(420px, 100%);
}

.project-dev img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 10px;
}

.project-dev div {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.project-dev strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 500;
}

.project-dev em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--muted);
}

.project-dev .status {
  margin: 0;
  font-size: 0.58rem;
}

.project-dev:hover {
  border-color: rgba(0, 130, 209, 0.4);
}

.contact {
  display: grid;
  place-items: center;
}

.contact-inner {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
}

.contact-lead {
  color: var(--muted);
  font-weight: 300;
  line-height: 1.75;
  max-width: 36ch;
}

.contact-notes {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  color: var(--ivory);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
}

.contact-notes li {
  padding: 0.55rem 0;
  border-top: 1px solid var(--gold-dim);
}

.form {
  position: relative;
  display: grid;
  gap: 1.05rem;
  padding: 1.6rem 1.5rem 1.4rem;
  border: 1px solid var(--gold-dim);
  background: rgba(8, 8, 11, 0.55);
  backdrop-filter: blur(16px);
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.64rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(0, 130, 209, 0.35);
  padding: 0.55rem 0 0.7rem;
  outline: none;
  border-radius: 0;
  transition: border-color 0.3s;
  caret-color: var(--gold);
}

.field textarea {
  resize: none;
  min-height: 7.2rem;
}

.field input:focus,
.field textarea:focus {
  border-bottom-color: var(--gold);
}

.field input::placeholder {
  color: rgba(155, 147, 136, 0.5);
}

.field.is-invalid input,
.field.is-invalid textarea {
  border-bottom-color: var(--danger);
}

.error {
  min-height: 1em;
  color: var(--danger);
  font-size: 0.72rem;
}

.submit {
  margin-top: 0.4rem;
  appearance: none;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--ivory);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.68rem;
  padding: 1rem 1.2rem;
  cursor: none;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
  position: relative;
}

.submit:hover,
.submit:focus-visible {
  background: var(--gold);
  color: #10140c;
}

.submit.is-busy {
  pointer-events: none;
  opacity: 0.7;
}

.submit-wait {
  display: none;
}

.submit.is-busy .submit-label {
  display: none;
}

.submit.is-busy .submit-wait {
  display: inline;
}

.form-note,
.form-fail {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 300;
}

.form-fail {
  color: var(--danger);
}

.thanks {
  grid-column: 2;
  text-align: center;
  padding: 2.5rem 1rem;
}

.thanks h3 {
  font-size: 2.6rem;
  margin-top: 0.6rem;
}

.thanks p {
  color: var(--muted);
  font-weight: 300;
}

.form[hidden],
.thanks[hidden] {
  display: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rule {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes drip {
  0%,
  100% {
    transform: scaleY(0.4);
    transform-origin: top;
    opacity: 0.4;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

@keyframes load {
  to {
    width: 100%;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 900px) {
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .thanks {
    grid-column: 1;
  }

  .project-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
  }

  .project:first-child {
    grid-column: 1 / -1;
  }

  .project-dev {
    max-width: none;
  }

  .project-meta p {
    display: none;
  }

  .project-meta em {
    opacity: 0.9;
  }

  .dots span {
    display: none;
  }
}

@media (max-width: 720px) {
  body {
    cursor: auto;
  }

  .dots {
    right: 0.7rem;
    gap: 0.85rem;
  }

  .dots a {
    width: 8px;
    height: 8px;
  }

  .project-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0.55rem;
  }

  .project,
  .project-dev {
    cursor: pointer;
  }

  .project-meta {
    padding: 0.7rem;
  }

  .project-meta h3 {
    font-size: 1.15rem;
  }

  .contact {
    overflow-y: auto;
    align-content: start;
    place-items: stretch;
  }

  .contact-notes {
    display: none;
  }

  .contact-lead {
    margin: 0.5rem 0 0;
    font-size: 0.86rem;
  }

  .contact-inner {
    gap: 0.95rem;
    padding-bottom: 0.4rem;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .form {
    padding: 1rem 1rem 0.95rem;
    gap: 0.7rem;
  }

  .field textarea {
    min-height: 4.4rem;
  }

  .submit {
    cursor: pointer;
  }
}

@media (max-height: 740px) {
  .logo-wrap {
    width: min(200px, 58vw);
    margin-bottom: 0.35rem;
  }

  .hero-title {
    font-size: 1.05rem;
    min-height: 1.6em;
  }

  .section-head h2,
  .contact-copy h2 {
    font-size: 2.1rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .loader-bar span {
    width: 100%;
  }
}

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}
