:root {
  --bg: #02070a;
  --bg-deep: #000305;
  --panel: rgba(5, 12, 16, 0.72);
  --panel-strong: rgba(3, 10, 14, 0.88);
  --cyan: #00d7df;
  --cyan-muted: #0e7c86;
  --text: #e8eef2;
  --muted: #8d9aa3;
  --border: rgba(0, 215, 223, 0.35);
  --border-soft: rgba(0, 215, 223, 0.18);
  --glow: rgba(0, 215, 223, 0.26);
  --header-height: 92px;
  --container: 1580px;
  --page-pad: clamp(20px, 3vw, 48px);
  --panel-pad: clamp(30px, 4.4vw, 74px);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 72% 8%, rgba(0, 215, 223, 0.08), transparent 28rem),
    linear-gradient(180deg, #02090d 0%, var(--bg) 46%, var(--bg-deep) 100%);
  color: var(--text);
  font-family:
    Bahnschrift,
    "Segoe UI",
    Arial,
    sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: -48px 0 0 -48px;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(0, 215, 223, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 215, 223, 0.032) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 70%);
  animation: grid-drift 90s linear infinite;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

section {
  scroll-margin-top: var(--header-height);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 8px 12px;
  color: var(--bg);
  background: var(--cyan);
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.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;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  width: 100%;
  min-height: var(--header-height);
  padding: 22px max(var(--page-pad), calc((100vw - var(--container)) / 2));
  border-bottom: 1px solid rgba(0, 215, 223, 0.09);
  background:
    linear-gradient(180deg, rgba(0, 5, 8, 0.76), rgba(0, 5, 8, 0.28)),
    rgba(0, 5, 8, 0.12);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 14px;
}

.brand-mark {
  position: relative;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid rgba(0, 215, 223, 0.24);
  background: #071014;
  clip-path: polygon(13% 0, 100% 0, 100% 86%, 86% 100%, 0 100%, 0 13%);
  box-shadow: 0 0 28px rgba(0, 215, 223, 0.16);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.brand-word {
  color: #f3f8fa;
  font-size: clamp(1rem, 1.35vw, 1.36rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1;
}

.brand-word span {
  color: var(--cyan);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 58px);
  margin-right: clamp(20px, 3.5vw, 54px);
}

.site-nav a {
  position: relative;
  padding: 7px 0 12px;
  color: rgba(232, 238, 242, 0.78);
  font-size: 0.98rem;
  letter-spacing: 0.06em;
  transition:
    color 180ms ease,
    text-shadow 180ms ease;
}

.site-nav a::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  content: "";
  background: #45fbff;
  box-shadow: 0 0 16px rgba(0, 215, 223, 0.78);
  transition: width 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  color: var(--text);
  text-shadow: 0 0 16px rgba(0, 215, 223, 0.2);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a.is-active::after {
  width: 100%;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(232, 238, 242, 0.48);
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.language-toggle button {
  padding: 0;
  color: rgba(232, 238, 242, 0.62);
  cursor: pointer;
  background: none;
  border: 0;
  transition:
    color 160ms ease,
    text-shadow 160ms ease;
}

.language-toggle button:hover,
.language-toggle button:focus-visible,
.language-toggle button.is-active {
  color: var(--cyan);
  text-shadow: 0 0 16px var(--glow);
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(560px, 68vh, 700px);
  padding: calc(var(--header-height) + 14px)
    max(var(--page-pad), calc((100vw - var(--container)) / 2)) 34px;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid rgba(0, 215, 223, 0.16);
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: clamp(70px, 10vh, 116px);
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(0, 3, 5, 0.84) 76%, #000305);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: #02090d;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.94;
  filter: blur(0.35px) saturate(1.14) contrast(1.14);
  transform: scale(1.08) translateY(var(--parallax-bg, 0px));
  animation: fade-in 800ms ease-out both;
}

.hero-hud {
  position: absolute;
  top: calc(var(--header-height) + 18px);
  right: max(var(--page-pad), calc((100vw - var(--container)) / 2));
  bottom: 34px;
  left: max(var(--page-pad), calc((100vw - var(--container)) / 2));
  z-index: 4;
  pointer-events: none;
  border: clamp(30px, 5vw, 72px) solid transparent;
  border-width: clamp(30px, 5vw, 72px) clamp(34px, 5.75vw, 83px);
  border-image: url("assets/hud-frame.webp") 200 230 stretch;
  background:
    linear-gradient(90deg, rgba(0, 3, 5, 0.34), rgba(0, 3, 5, 0.04) 48%, rgba(0, 3, 5, 0.12)),
    linear-gradient(180deg, rgba(0, 215, 223, 0.035), transparent 32%, rgba(0, 215, 223, 0.025));
  filter: drop-shadow(0 0 22px rgba(0, 215, 223, 0.1));
  animation:
    hud-boot 1s ease-out both,
    hud-flicker 12s linear 5s infinite;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(460px, 1.28fr);
  align-items: center;
  width: min(var(--container), 100%);
  min-height: clamp(420px, calc(68vh - var(--header-height) - 48px), 560px);
  margin: 0 auto;
  padding: clamp(38px, 5vh, 70px) var(--panel-pad);
  gap: clamp(14px, 2vw, 34px);
  overflow: visible;
}

.hero-copy {
  max-width: 430px;
  padding-top: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--cyan);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.eyebrow i {
  display: block;
  width: 156px;
  height: 1px;
  background:
    linear-gradient(90deg, rgba(0, 215, 223, 0.7), transparent 66%),
    linear-gradient(90deg, transparent 0 24%, rgba(0, 215, 223, 0.42) 24% 34%, transparent 34%);
}

.hero-copy p {
  max-width: 410px;
  margin: 20px 0 0;
  color: rgba(232, 238, 242, 0.72);
  font-size: clamp(0.96rem, 1.05vw, 1.05rem);
  font-weight: 300;
  line-height: 1.72;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-height: 390px;
}

.hero-visual::before {
  position: absolute;
  right: -6%;
  top: 51%;
  width: min(58vw, 900px);
  aspect-ratio: 1 / 1;
  content: "";
  background: radial-gradient(circle, rgba(0, 215, 223, 0.22), rgba(0, 215, 223, 0.08) 30%, transparent 62%);
  filter: blur(4px);
  transform: translateY(-50%);
  animation: glow-breathe 9s ease-in-out infinite;
}

.whippet-holo {
  position: absolute;
  top: 51%;
  right: -3%;
  z-index: 2;
  width: clamp(423px, 29.25vw, 558px);
  transform: translate(2vw, calc(-50% + var(--parallax-fg, 0px)));
  -webkit-mask-image: radial-gradient(ellipse at 50% 47%, black 62%, rgba(0, 0, 0, 0.88) 72%, transparent 86%);
  mask-image: radial-gradient(ellipse at 50% 47%, black 58%, rgba(0, 0, 0, 0.82) 68%, transparent 78%);
  animation: fade-in 950ms ease-out 240ms both;
}

.whippet-hero {
  width: 100%;
  height: auto;
  filter:
    drop-shadow(0 0 34px rgba(0, 215, 223, 0.18))
    drop-shadow(0 28px 60px rgba(0, 0, 0, 0.78));
}

.whippet-ghost {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.whippet-ghost-lines {
  filter: brightness(1.4) saturate(1.3);
  opacity: 0.45;
  -webkit-mask-image: repeating-linear-gradient(180deg, black 0 1px, transparent 1px 4px);
  -webkit-mask-repeat: repeat;
  mask-image: repeating-linear-gradient(180deg, black 0 1px, transparent 1px 4px);
  mask-repeat: repeat;
  animation:
    holo-lines 9s linear infinite,
    holo-flicker 9s steps(1, end) infinite;
}

.whippet-ghost-sweep {
  filter: brightness(1.7) saturate(1.45);
  opacity: 0.6;
  -webkit-mask-image: linear-gradient(180deg, transparent, black 45% 55%, transparent);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 26%;
  -webkit-mask-position: 0 -30%;
  mask-image: linear-gradient(180deg, transparent, black 45% 55%, transparent);
  mask-repeat: no-repeat;
  mask-size: 100% 26%;
  mask-position: 0 -30%;
  animation: holo-sweep 9s linear infinite;
}

@supports not ((mask-image: linear-gradient(#000, #000)) or (-webkit-mask-image: linear-gradient(#000, #000))) {
  .whippet-ghost {
    display: none;
  }
}

.projects-section {
  position: relative;
  margin-top: 0;
  padding: 10px max(var(--page-pad), calc((100vw - var(--container)) / 2)) 76px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 7, 10, 0.4), rgba(0, 3, 5, 0.98) 44%),
    var(--bg-deep);
}

.projects-section::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, transparent 0 52%, rgba(0, 215, 223, 0.06) 52% calc(52% + 1px), transparent calc(52% + 1px)),
    linear-gradient(180deg, rgba(0, 215, 223, 0.08), transparent 1px);
  opacity: 0.22;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 58%);
}

.projects-inner {
  position: relative;
  z-index: 1;
  width: min(var(--container), 100%);
  margin: 0 auto;
  padding: 0 var(--panel-pad);
}

.section-heading {
  position: relative;
  display: grid;
  gap: 6px;
  padding-bottom: 12px;
}

.section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2.55rem, 5.2vw, 5.1rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: clamp(0.18em, 1.6vw, 0.36em);
}

.section-index {
  position: absolute;
  top: -16px;
  right: clamp(44px, 8vw, 140px);
  color: transparent;
  font-size: clamp(5.8rem, 9vw, 9rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.05em;
  opacity: 0.42;
  -webkit-text-stroke: 1px rgba(0, 215, 223, 0.4);
  animation: index-pulse 8s ease-in-out infinite;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 1.8vw, 24px);
}

.project-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(1320px, calc(100% - clamp(28px, 5vw, 80px)));
  max-width: 100%;
}

.project-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  min-height: 318px;
  overflow: hidden;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(5, 14, 18, 0.78), rgba(2, 7, 10, 0.94)),
    var(--panel);
  border: 1px solid rgba(0, 215, 223, 0.32);
  clip-path: polygon(26px 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%, 0 26px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.018),
    0 0 40px rgba(0, 215, 223, 0.08),
    0 24px 60px rgba(0, 0, 0, 0.28);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.project-card::before,
.project-card::after {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  content: "";
}

.project-card::before {
  inset: 10px;
  border: 1px solid rgba(0, 215, 223, 0.18);
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}

.project-card::after {
  right: 18px;
  bottom: 18px;
  width: 70px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 215, 223, 0.7));
  transition:
    width 180ms ease,
    background 180ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  border-color: var(--border);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.024),
    0 0 28px rgba(0, 215, 223, 0.1),
    0 30px 70px rgba(0, 0, 0, 0.36);
  transform: translateY(-4px);
}

.project-card:hover::after,
.project-card:focus-visible::after {
  width: 92px;
  background: linear-gradient(90deg, transparent, rgba(69, 251, 255, 0.96));
}

.project-card-media {
  position: relative;
  height: clamp(214px, 16.5vw, 260px);
  min-height: 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 215, 223, 0.14);
}

.project-card-media::before {
  position: absolute;
  top: -12%;
  bottom: -12%;
  left: 0;
  z-index: 2;
  width: 36%;
  pointer-events: none;
  content: "";
  background: linear-gradient(
    102deg,
    transparent,
    rgba(150, 248, 255, 0.16) 45%,
    rgba(0, 215, 223, 0.06) 55%,
    transparent
  );
  opacity: 0;
  transform: translateX(-130%) skewX(-14deg);
}

.project-card:hover .project-card-media::before,
.project-card:focus-visible .project-card-media::before {
  animation: shine-sweep 700ms ease-out;
}

.project-card-media::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, rgba(0, 10, 14, 0.08), rgba(0, 3, 5, 0.7)),
    linear-gradient(90deg, rgba(0, 215, 223, 0.1), transparent 44%, rgba(0, 3, 5, 0.22)),
    radial-gradient(circle at 50% 38%, rgba(0, 215, 223, 0.13), transparent 42%);
}

.project-card-media img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: var(--thumb-pos, center);
  opacity: 0.76;
  filter:
    saturate(var(--thumb-saturation, 1.03))
    contrast(1.08)
    brightness(var(--thumb-brightness, 1));
  transform-origin: var(--thumb-origin, center);
  transform: scale(var(--thumb-scale, 1.06));
  transition:
    opacity 180ms ease,
    transform 260ms ease;
}

.project-card-media-portrait {
  display: grid;
  place-items: center;
  height: clamp(214px, 16.5vw, 260px);
  min-height: 0;
  background:
    radial-gradient(circle at 58% 45%, rgba(126, 135, 255, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(7, 16, 22, 0.84), rgba(2, 7, 10, 0.94));
}

.project-card-media-portrait img {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: 50% 0%;
  opacity: 0.84;
  filter: saturate(0.78) contrast(1.08) brightness(0.74);
}

.project-card:first-child .project-card-media::after {
  background:
    linear-gradient(180deg, rgba(0, 9, 13, 0.22), rgba(0, 3, 5, 0.78)),
    linear-gradient(90deg, rgba(0, 215, 223, 0.16), transparent 48%, rgba(0, 3, 5, 0.3)),
    radial-gradient(circle at 50% 35%, rgba(0, 215, 223, 0.12), transparent 42%);
}

.project-card:hover .project-card-media img,
.project-card:focus-visible .project-card-media img {
  opacity: 0.92;
  transform: scale(var(--thumb-scale-hover, 1.1));
}

.project-card-signal {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: var(--cyan);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  background: rgba(1, 8, 11, 0.72);
  border: 1px solid rgba(0, 215, 223, 0.3);
  clip-path: polygon(11px 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%, 0 11px);
  box-shadow: 0 0 18px rgba(0, 215, 223, 0.1);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.project-card-body {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  min-height: 90px;
  padding: 18px 24px 22px;
}

.project-card h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.05rem, 1.32vw, 1.28rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.project-card p {
  margin: 7px 0 0;
  color: var(--cyan);
  font-size: 0.92rem;
  font-weight: 300;
}

.project-arrow {
  color: var(--cyan);
  font-size: 1.3rem;
  line-height: 1;
  text-shadow: 0 0 14px var(--glow);
  transform: translateY(-2px);
  transition:
    color 180ms ease,
    text-shadow 180ms ease,
    transform 180ms ease;
}

.project-card:hover .project-card-signal,
.project-card:focus-visible .project-card-signal {
  color: #45fbff;
  border-color: rgba(69, 251, 255, 0.58);
  box-shadow: 0 0 22px rgba(0, 215, 223, 0.18);
  animation: signal-glitch 240ms steps(2, end) 1;
}

.project-card:hover .project-arrow,
.project-card:focus-visible .project-arrow {
  color: #45fbff;
  text-shadow: 0 0 18px rgba(0, 215, 223, 0.48);
  transform: translate(5px, -2px);
}

.content-section {
  position: relative;
  padding: clamp(40px, 6vw, 84px) max(var(--page-pad), calc((100vw - var(--container)) / 2));
  background: var(--bg-deep);
  border-top: 1px solid rgba(0, 215, 223, 0.12);
}

.content-inner {
  width: min(var(--container), 100%);
  margin: 0 auto;
  padding: 0 var(--panel-pad);
}

.content-section h2 {
  margin: 14px 0 0;
  color: var(--text);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 300;
  letter-spacing: 0.14em;
}

.content-body {
  max-width: 680px;
  margin-top: clamp(18px, 2.4vw, 30px);
  display: grid;
  gap: 16px;
}

.content-body p {
  margin: 0;
  color: rgba(232, 238, 242, 0.74);
  font-size: 0.98rem;
  line-height: 1.62;
  letter-spacing: 0.01em;
}

.contact-email {
  justify-self: start;
  margin-top: 4px;
  padding-bottom: 2px;
  color: var(--cyan);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 215, 223, 0.4);
  transition:
    color 0.18s ease,
    border-color 0.18s ease;
}

.contact-email:hover,
.contact-email:focus-visible {
  color: #6ff4fb;
  border-color: rgba(0, 215, 223, 0.9);
}

.project-detail-page {
  background:
    radial-gradient(circle at 64% 18%, rgba(0, 215, 223, 0.08), transparent 30rem),
    radial-gradient(circle at 18% 76%, rgba(255, 153, 0, 0.045), transparent 28rem),
    linear-gradient(180deg, #02090d 0%, #000305 100%);
}

.project-detail {
  padding: calc(var(--header-height) + 42px)
    max(var(--page-pad), calc((100vw - var(--container)) / 2)) 82px;
}

.project-detail-hero,
.project-article {
  width: min(var(--container), 100%);
  margin: 0 auto;
  padding: 0 var(--panel-pad);
}

.back-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 30px;
  color: var(--cyan);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.back-link::before {
  content: "<";
  margin-right: 10px;
}

.project-detail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(520px, 1.28fr);
  align-items: center;
  gap: clamp(28px, 4vw, 72px);
}

.project-detail-copy h1 {
  margin: 26px 0 0;
  color: var(--text);
  font-size: clamp(2.55rem, 3.5vw, 4.4rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: 0.08em;
}

.project-lead {
  max-width: 460px;
  margin: 28px 0 0;
  color: rgba(232, 238, 242, 0.78);
  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
  line-height: 1.7;
}

.project-meta {
  display: grid;
  gap: 12px;
  max-width: 460px;
  margin: 36px 0 0;
}

.project-meta div {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid rgba(0, 215, 223, 0.16);
}

.project-meta dt {
  color: var(--cyan);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.project-meta dd {
  margin: 0;
  color: rgba(232, 238, 242, 0.72);
  font-size: 0.96rem;
}

.project-image-panel {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(0, 215, 223, 0.25);
  background:
    linear-gradient(180deg, rgba(5, 14, 18, 0.86), rgba(2, 7, 10, 0.96)),
    var(--panel);
  clip-path: polygon(28px 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%, 0 28px);
  box-shadow:
    0 0 42px rgba(0, 215, 223, 0.08),
    0 30px 80px rgba(0, 0, 0, 0.36);
}

.project-image-panel::before {
  position: absolute;
  inset: 12px;
  z-index: 1;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(255, 153, 0, 0.28);
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}

.project-image-panel img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  opacity: 0.94;
}

.project-image-panel-dashboard {
  display: grid;
  place-items: center;
  padding: clamp(10px, 1vw, 16px);
}

.project-image-panel-dashboard img {
  aspect-ratio: auto;
  object-fit: contain;
}

.project-image-panel-phone {
  display: grid;
  place-items: center;
  min-height: clamp(520px, 55vw, 760px);
  background:
    radial-gradient(circle at 58% 38%, rgba(126, 135, 255, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(5, 14, 18, 0.88), rgba(2, 7, 10, 0.96)),
    var(--panel);
}

.project-image-panel-phone::before {
  border-color: rgba(0, 215, 223, 0.24);
}

.project-image-panel-phone img {
  width: auto;
  max-width: min(76%, 520px);
  height: clamp(430px, 58vw, 720px);
  max-height: 720px;
  aspect-ratio: auto;
  padding: clamp(12px, 1.4vw, 18px);
  object-fit: contain;
  opacity: 0.96;
  filter: saturate(0.9) contrast(1.03);
}

.project-article {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 28px);
  margin-top: clamp(54px, 7vw, 92px);
}

.article-block {
  position: relative;
  min-height: 260px;
  padding: 34px clamp(24px, 3vw, 42px) 36px;
  border: 1px solid rgba(0, 215, 223, 0.2);
  background:
    linear-gradient(180deg, rgba(5, 14, 18, 0.7), rgba(2, 7, 10, 0.88)),
    rgba(5, 12, 16, 0.7);
  clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px);
}

.article-block::before {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 54px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(0, 215, 223, 0.68));
}

.article-block-wide {
  grid-column: 1 / -1;
  min-height: 0;
}

.article-index {
  display: block;
  color: var(--cyan);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.article-block h2 {
  margin: 16px 0 0;
  color: var(--text);
  font-size: clamp(1.35rem, 2vw, 2.1rem);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.article-block p {
  margin: 20px 0 0;
  color: rgba(232, 238, 242, 0.72);
  font-size: 1rem;
  line-height: 1.85;
}

.project-store-section {
  display: flex;
  justify-content: center;
  width: min(var(--container), 100%);
  margin: clamp(34px, 5vw, 72px) auto 0;
  padding: 0 var(--panel-pad);
}

.play-download-button {
  position: relative;
  display: grid;
  align-items: center;
  width: min(560px, 100%);
  min-height: 142px;
  overflow: visible;
  color: var(--text);
  background: transparent;
  isolation: isolate;
  transition:
    filter 180ms ease,
    transform 180ms ease;
}

.play-download-button img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  mix-blend-mode: screen;
  pointer-events: none;
}

.play-download-text {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  padding: 28px 42px 28px clamp(132px, 24%, 170px);
  text-shadow: 0 0 18px rgba(0, 215, 223, 0.24);
}

.play-download-text span {
  color: rgba(232, 238, 242, 0.7);
  font-size: clamp(0.78rem, 1vw, 0.95rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.play-download-text strong {
  color: #f2fbfd;
  font-size: clamp(1.35rem, 2.2vw, 2.2rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.05em;
}

.play-download-button:hover,
.play-download-button:focus-visible {
  filter: drop-shadow(0 0 22px rgba(0, 215, 223, 0.18));
  transform: translateY(-2px);
}

.play-download-button:focus-visible {
  outline: 1px solid rgba(69, 251, 255, 0.72);
  outline-offset: 4px;
}

@media (max-width: 1020px) {
  :root {
    --header-height: 116px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    gap: 14px 22px;
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    margin-right: 0;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    align-content: center;
    padding-top: 28px;
  }

  .hero-copy {
    max-width: 560px;
    padding-top: 0;
  }

  .hero-copy p {
    max-width: 520px;
  }

  .hero-visual {
    min-height: 390px;
    margin-top: -28px;
  }

  .whippet-holo {
    width: min(61vw, 477px);
    transform: translateY(var(--parallax-fg, 0px));
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-section {
    margin-top: -34px;
  }

  .project-grid-compact {
    width: 100%;
  }

  .project-detail-grid,
  .project-article {
    grid-template-columns: 1fr;
  }

  .project-detail-copy h1 {
    letter-spacing: 0.12em;
  }

  .article-block-wide {
    grid-column: auto;
  }

}

@media (max-width: 680px) {
  :root {
    --header-height: 142px;
  }

  .site-header {
    align-items: start;
    padding: 18px 18px 16px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand-word {
    font-size: 0.98rem;
  }

  .site-nav {
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .language-toggle {
    padding-top: 10px;
  }

  .hero {
    min-height: 84vh;
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero-hud {
    inset: calc(var(--header-height) + 12px) 12px 18px;
    opacity: 0.72;
  }

  .hero-inner {
    min-height: calc(84vh - var(--header-height));
    gap: 8px;
  }

  .hero-copy {
    align-self: end;
  }

  .hero-copy p {
    margin-top: 18px;
    font-size: 0.98rem;
    line-height: 1.72;
  }

  .eyebrow i {
    width: 76px;
  }

  .hero-visual {
    min-height: min(84vw, 400px);
    align-self: start;
    margin-top: -10px;
  }

  .whippet-holo {
    top: 50%;
    width: min(80vw, 380px);
    transform: translateY(calc(-50% + var(--parallax-fg, 0px)));
  }

  .section-heading h2 {
    font-size: clamp(2.15rem, 12vw, 3.25rem);
    letter-spacing: 0.18em;
  }

  .section-index {
    display: none;
  }

  .projects-section {
    margin-top: 0;
    padding-top: 32px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 270px;
  }

  .project-detail {
    padding: calc(var(--header-height) + 30px) 18px 58px;
  }

  .project-detail-hero,
  .project-article,
  .project-store-section {
    padding: 0;
  }

  .project-detail-copy h1 {
    font-size: clamp(2.4rem, 15vw, 4rem);
    letter-spacing: 0.08em;
  }

  .project-lead {
    margin-top: 20px;
    font-size: 1rem;
  }

  .project-meta {
    margin-top: 26px;
  }

  .project-detail-grid {
    gap: 30px;
  }

  .project-article {
    margin-top: 38px;
  }

  .project-store-section {
    margin-top: 36px;
  }

  .play-download-button {
    min-height: 118px;
  }

  .play-download-text {
    padding: 24px 28px 24px clamp(104px, 30vw, 128px);
  }

  .article-block {
    min-height: 0;
    padding: 28px 22px 30px;
  }

  .article-block p {
    font-size: 0.96rem;
    line-height: 1.78;
  }
}

/* Motion layer: entrance animations, ambient motion and micro-interactions. */

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
}

@keyframes reveal-rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
}

@keyframes line-draw {
  from {
    transform: scaleX(0);
  }
}

@keyframes grid-drift {
  to {
    transform: translate3d(48px, 48px, 0);
  }
}

@keyframes hud-boot {
  0% {
    opacity: 0;
  }

  45% {
    opacity: 0.35;
  }

  55% {
    opacity: 0.18;
  }

  70% {
    opacity: 0.85;
  }

  78% {
    opacity: 0.6;
  }

  100% {
    opacity: 1;
  }
}

@keyframes hud-flicker {
  0%,
  90.5%,
  93%,
  95%,
  100% {
    opacity: 1;
  }

  91% {
    opacity: 0.72;
  }

  92% {
    opacity: 0.95;
  }

  94% {
    opacity: 0.84;
  }
}

@keyframes glow-breathe {
  0%,
  100% {
    opacity: 0.82;
    transform: translateY(-50%) scale(0.97);
  }

  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
  }
}

@keyframes holo-lines {
  from {
    -webkit-mask-position: 0 0;
    mask-position: 0 0;
  }

  to {
    -webkit-mask-position: 0 -88px;
    mask-position: 0 -88px;
  }
}

@keyframes holo-sweep {
  from {
    -webkit-mask-position: 0 -30%;
    mask-position: 0 -30%;
  }

  to {
    -webkit-mask-position: 0 130%;
    mask-position: 0 130%;
  }
}

@keyframes holo-flicker {
  0%,
  100% {
    opacity: 0.45;
  }

  46% {
    opacity: 0.45;
  }

  47% {
    opacity: 0.18;
  }

  48% {
    opacity: 0.52;
  }

  49% {
    opacity: 0.25;
  }

  50% {
    opacity: 0.45;
  }

  81% {
    opacity: 0.45;
  }

  82% {
    opacity: 0.2;
  }

  83.5% {
    opacity: 0.45;
  }
}

@keyframes index-pulse {
  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.52;
  }
}

@keyframes shine-sweep {
  0% {
    opacity: 0;
    transform: translateX(-130%) skewX(-14deg);
  }

  18% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(320%) skewX(-14deg);
  }
}

@keyframes signal-glitch {
  0%,
  100% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(-2px, 1px);
  }

  50% {
    transform: translate(2px, -1px);
  }

  75% {
    transform: translate(-1px, -1px);
  }
}

.hero-copy .eyebrow {
  animation: rise-in 640ms cubic-bezier(0.22, 0.8, 0.32, 1) 160ms both;
}

.hero-copy p:nth-of-type(1) {
  animation: rise-in 640ms cubic-bezier(0.22, 0.8, 0.32, 1) 300ms both;
}

.hero-copy p:nth-of-type(2) {
  animation: rise-in 640ms cubic-bezier(0.22, 0.8, 0.32, 1) 440ms both;
}

.eyebrow i {
  transform-origin: left center;
}

.hero-copy .eyebrow i {
  animation: line-draw 800ms cubic-bezier(0.22, 0.8, 0.32, 1) 620ms both;
}

.project-detail-page .back-link {
  animation: rise-in 560ms cubic-bezier(0.22, 0.8, 0.32, 1) 80ms both;
}

.project-detail-copy .eyebrow {
  animation: rise-in 640ms cubic-bezier(0.22, 0.8, 0.32, 1) 180ms both;
}

.project-detail-copy .eyebrow i {
  animation: line-draw 800ms cubic-bezier(0.22, 0.8, 0.32, 1) 640ms both;
}

.project-detail-copy h1 {
  animation: rise-in 640ms cubic-bezier(0.22, 0.8, 0.32, 1) 280ms both;
}

.project-detail-copy .project-lead {
  animation: rise-in 640ms cubic-bezier(0.22, 0.8, 0.32, 1) 380ms both;
}

.project-detail-copy .project-meta {
  animation: rise-in 640ms cubic-bezier(0.22, 0.8, 0.32, 1) 480ms both;
}

.project-detail-grid .project-image-panel {
  animation: rise-in 760ms cubic-bezier(0.22, 0.8, 0.32, 1) 320ms both;
}

main,
.site-nav {
  transition: opacity 180ms ease;
}

body.is-translating main,
body.is-translating .site-nav {
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
  }

  html.js .reveal.is-visible {
    opacity: 1;
    animation: reveal-rise 720ms cubic-bezier(0.22, 0.8, 0.32, 1) backwards;
    animation-delay: var(--reveal-delay, 0ms);
  }

  html.js .reveal .eyebrow i {
    transform: scaleX(0);
    transition: transform 800ms cubic-bezier(0.22, 0.8, 0.32, 1) 260ms;
  }

  html.js .reveal.is-visible .eyebrow i {
    transform: scaleX(1);
  }

  .project-grid .project-card:nth-child(2) {
    --reveal-delay: 120ms;
  }

  .project-grid .project-card:nth-child(3) {
    --reveal-delay: 240ms;
  }

  .project-article .article-block:nth-child(even) {
    --reveal-delay: 110ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
