:root {
  --bg: #040102;
  --bg-deep: #090103;
  --panel: rgba(20, 4, 7, 0.78);
  --panel-strong: rgba(33, 5, 10, 0.9);
  --line: rgba(255, 77, 95, 0.28);
  --line-strong: rgba(255, 103, 118, 0.72);
  --text: #f9f2f4;
  --muted: #d3a7ad;
  --accent: #ff445f;
  --accent-bright: #ff7e73;
  --accent-dim: #6d0f1f;
  --shadow: rgba(255, 68, 95, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  background: #020001;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Rajdhani", "Segoe UI", sans-serif;
  line-height: 1.55;
  background:
    linear-gradient(115deg, transparent 0 62%, rgba(255, 68, 95, 0.06) 62% 68%, transparent 68% 100%),
    radial-gradient(circle at 50% -10%, rgba(255, 52, 72, 0.22), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(125, 10, 31, 0.34), transparent 25%),
    linear-gradient(135deg, #0a0104 0%, #030001 42%, #060002 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(255, 255, 255, 0.03) calc(100% - 1px)),
    linear-gradient(transparent 0, transparent calc(100% - 1px), rgba(255, 255, 255, 0.025) calc(100% - 1px));
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 85%);
}

body::after {
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 90, 107, 0.08) 48%, transparent 52%),
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.03) 50%, transparent 100%);
  mix-blend-mode: screen;
  opacity: 0.35;
}

.screen-fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.screen-noise,
.screen-grid,
.screen-scanline {
  position: absolute;
  inset: 0;
}

.screen-noise {
  opacity: 0.07;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.7) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 55%, rgba(255, 255, 255, 0.45) 0 1px, transparent 1px),
    radial-gradient(circle at 45% 80%, rgba(255, 255, 255, 0.35) 0 1px, transparent 1px);
  background-size: 12px 12px, 18px 18px, 16px 16px;
}

.screen-grid {
  background:
    linear-gradient(90deg, rgba(255, 68, 95, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(255, 68, 95, 0.03) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: radial-gradient(circle at center, black 25%, transparent 85%);
  opacity: 0.3;
}

.screen-scanline {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 35%, transparent 65%, rgba(255, 255, 255, 0.04));
  opacity: 0.16;
  animation: scanline 8s linear infinite;
}

:root.glitch-active .screen-noise {
  opacity: 0.14;
}

:root.glitch-active .screen-scanline {
  opacity: 0.3;
}

:root.glitch-active .hero-glitch-bars span,
:root.glitch-active .glitch::before,
:root.glitch-active .glitch::after {
  animation-duration: 0.22s;
  opacity: 1;
}

.page,
footer {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100vw - 2rem));
  margin: 0 auto;
}

.page {
  padding: 2rem 0 3rem;
}

.panel {
  position: relative;
  padding: 1.4rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
    linear-gradient(135deg, rgba(255, 74, 97, 0.08), transparent 45%),
    var(--panel);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 22px 55px rgba(0, 0, 0, 0.52),
    0 0 40px var(--shadow);
  overflow: hidden;
}

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

.panel::before {
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 12px, rgba(255, 90, 107, 0.1) 12px 13px, transparent 13px),
    linear-gradient(180deg, transparent 0 12px, rgba(255, 90, 107, 0.1) 12px 13px, transparent 13px);
  opacity: 0.5;
}

.panel::after {
  top: 0.9rem;
  right: 0.9rem;
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--line-strong));
  box-shadow: 0 14px 0 rgba(255, 103, 118, 0.24);
}

.hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  min-height: 420px;
}

.hero-glitch-bars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-glitch-bars span {
  position: absolute;
  left: -8%;
  display: block;
  height: 14px;
  background: linear-gradient(90deg, transparent, rgba(255, 92, 112, 0.28), rgba(255, 255, 255, 0.12), transparent);
  mix-blend-mode: screen;
}

.hero-glitch-bars span:nth-child(1) {
  top: 18%;
  width: 46%;
  animation: glitch-bar-a 6s steps(2, end) infinite;
}

.hero-glitch-bars span:nth-child(2) {
  top: 54%;
  width: 64%;
  height: 8px;
  animation: glitch-bar-b 7s steps(2, end) infinite;
}

.hero-glitch-bars span:nth-child(3) {
  top: 77%;
  width: 52%;
  left: 22%;
  height: 10px;
  animation: glitch-bar-c 5.5s steps(2, end) infinite;
}

.hero::after {
  width: 120px;
  top: auto;
  right: auto;
  bottom: 1.2rem;
  left: 1.4rem;
  background: linear-gradient(90deg, var(--line-strong), transparent);
  box-shadow:
    0 -14px 0 rgba(255, 103, 118, 0.22),
    0 14px 0 rgba(255, 103, 118, 0.12);
}

.hero-media {
  display: flex;
  justify-content: center;
}

.avatar-wrap {
  position: relative;
  width: min(100%, 255px);
  aspect-ratio: 1 / 1.18;
  padding: 14px;
}

.avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.95) contrast(1.03);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px));
  border: 1px solid rgba(255, 116, 116, 0.5);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 0 28px rgba(255, 68, 95, 0.22);
}

.avatar-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 126, 115, 0.45);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px));
  transform: translate(10px, 10px);
  opacity: 0.75;
}

.avatar-corner {
  position: absolute;
  width: 96px;
  height: 96px;
  border: 2px solid rgba(255, 126, 115, 0.34);
}

.avatar-corner-top {
  top: -2px;
  left: -2px;
  border-right: 0;
  border-bottom: 0;
}

.avatar-corner-bottom {
  right: -2px;
  bottom: -2px;
  border-left: 0;
  border-top: 0;
}

.hero-copy {
  position: relative;
  min-width: 0;
  z-index: 1;
}

.hero-name {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-family: "Oxanium", sans-serif;
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0.8rem 0 0;
  color: var(--accent-bright);
  font-family: "Oxanium", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Oxanium", sans-serif;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.8rem, 8vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: 0.04em;
}

.hero-copy-shadow {
  position: absolute;
  top: 50%;
  left: 0.12em;
  transform: translateY(-32%);
  font-family: "Oxanium", sans-serif;
  font-size: clamp(2.8rem, 8vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 68, 95, 0.09);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.glitch {
  position: relative;
  z-index: 1;
  display: inline-block;
  text-shadow:
    0 0 16px rgba(255, 93, 109, 0.22),
    0 0 28px rgba(255, 68, 95, 0.1);
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.72;
}

.glitch::before {
  color: rgba(255, 87, 104, 0.55);
  transform: translate(2px, -1px);
  clip-path: polygon(0 8%, 100% 0, 100% 36%, 0 44%);
  animation: glitch-slice-a 3.6s steps(2, end) infinite;
}

.glitch::after {
  color: rgba(255, 196, 196, 0.35);
  transform: translate(-3px, 2px);
  clip-path: polygon(0 58%, 100% 48%, 100% 100%, 0 100%);
  animation: glitch-slice-b 4.2s steps(2, end) infinite;
}

.section {
  margin-top: 1rem;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.link-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  min-height: 76px;
  padding: 1rem 1.1rem;
  color: var(--text);
  text-decoration: none;
  font-family: "Oxanium", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background:
    linear-gradient(120deg, rgba(255, 94, 94, 0.14), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    rgba(23, 4, 7, 0.85);
  border: 1px solid rgba(255, 87, 104, 0.24);
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.link-pill::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.85;
}

.link-pill::after {
  content: "";
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  width: 36px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 126, 115, 0.7));
  box-shadow: 0 10px 0 rgba(255, 126, 115, 0.18);
}

.link-pill:hover {
  transform: translateY(-3px) skewX(-2deg);
  border-color: rgba(255, 126, 115, 0.7);
  box-shadow:
    0 0 0 1px rgba(255, 126, 115, 0.1) inset,
    0 0 32px rgba(255, 68, 95, 0.18);
}

.link-icon {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  color: var(--accent-bright);
  font-size: 1.1rem;
  border: 1px solid rgba(255, 126, 115, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent),
    rgba(255, 255, 255, 0.03);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 0 18px rgba(255, 68, 95, 0.1);
}

.social-mark {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}

.social-mark-image {
  object-fit: contain;
}

.social-mark-linkedin rect:first-child {
  fill: currentColor;
}

.social-mark-linkedin circle,
.social-mark-linkedin rect:not(:first-child),
.social-mark-linkedin path {
  fill: #120406;
}

.link-pill.linkedin .link-icon {
  color: #ff8a80;
  border-color: rgba(255, 138, 128, 0.34);
}

.link-pill.instagram .link-icon {
  color: #ff6e8f;
  border-color: rgba(255, 110, 143, 0.34);
}

.link-pill.steam .link-icon {
  overflow: hidden;
  border-color: rgba(255, 176, 165, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
    rgba(0, 0, 0, 0.28);
}

.link-pill.steam .social-mark-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: none;
}

.link-pill.linkedin:hover .link-icon,
.link-pill.instagram:hover .link-icon,
.link-pill.steam:hover .link-icon {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 22px rgba(255, 126, 115, 0.18);
}

h2 {
  margin-bottom: 1rem;
  font-size: 1rem;
  letter-spacing: 0.22em;
  color: var(--accent-bright);
}

.project-grid {
  display: grid;
  gap: 1rem;
}

.project-card {
  position: relative;
  border: 1px solid rgba(255, 87, 104, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 87, 104, 0.08), transparent 34%),
    var(--panel-strong);
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  overflow: hidden;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.015) 0 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.3;
  pointer-events: none;
}

.project-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(180px, 320px) minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem;
  padding: 1.15rem;
}

.project-logo {
  width: 100%;
  max-width: 320px;
  display: block;
  border: 1px solid rgba(255, 126, 115, 0.18);
  background: #000;
  box-shadow: 0 0 28px rgba(0, 0, 0, 0.32);
}

.project-copy {
  position: relative;
}

.project-copy::before {
  content: "";
  position: absolute;
  top: -0.35rem;
  left: 0;
  width: 52px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-bright), transparent);
}

.project-body h3 {
  margin-bottom: 0.55rem;
  font-size: 1.8rem;
  letter-spacing: 0.08em;
}

.project-body p {
  margin: 0 0 0.9rem;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.project-body a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-family: "Oxanium", sans-serif;
  font-size: 0.96rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
}

.project-body a::after {
  content: "";
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-bright), transparent);
}

footer {
  padding: 0 0 2rem;
  color: rgba(211, 167, 173, 0.78);
  font-family: "Oxanium", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes glitch-slice-a {
  0%,
  80%,
  100% {
    transform: translate(2px, -1px);
  }
  82% {
    transform: translate(-4px, 2px);
  }
  84% {
    transform: translate(3px, -2px);
  }
}

@keyframes glitch-slice-b {
  0%,
  75%,
  100% {
    transform: translate(-3px, 2px);
  }
  78% {
    transform: translate(4px, 0);
  }
  80% {
    transform: translate(-2px, -3px);
  }
}

@keyframes glitch-bar-a {
  0%,
  76%,
  100% {
    transform: translateX(0);
    opacity: 0;
  }
  78% {
    transform: translateX(18%);
    opacity: 1;
  }
  80% {
    transform: translateX(36%);
    opacity: 0.85;
  }
}

@keyframes glitch-bar-b {
  0%,
  70%,
  100% {
    transform: translateX(0);
    opacity: 0;
  }
  72% {
    transform: translateX(12%);
    opacity: 0.95;
  }
  74% {
    transform: translateX(26%);
    opacity: 0.45;
  }
}

@keyframes glitch-bar-c {
  0%,
  82%,
  100% {
    transform: translateX(0);
    opacity: 0;
  }
  84% {
    transform: translateX(-14%);
    opacity: 0.9;
  }
  86% {
    transform: translateX(10%);
    opacity: 0.3;
  }
}

@keyframes scanline {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-media {
    justify-content: flex-start;
  }

  .links-grid,
  .project-body {
    grid-template-columns: 1fr;
  }

  .project-logo {
    max-width: 260px;
  }
}

@media (max-width: 640px) {
  .page,
  footer {
    width: min(100vw - 1rem, 1080px);
  }

  .page {
    padding-top: 1rem;
  }

  .panel {
    padding: 1rem;
  }

  .avatar-wrap {
    width: min(100%, 190px);
  }

  .eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
  }

  h1 {
    font-size: clamp(2.1rem, 13vw, 3.4rem);
  }

  .hero-copy-shadow {
    font-size: clamp(2.1rem, 13vw, 3.4rem);
  }

  .link-pill {
    min-height: 68px;
  }

  .project-body h3 {
    font-size: 1.35rem;
  }

  .project-body p {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
