:root {
  --bg: #050505;
  --ink: #f7f1e6;
  --muted: #a7a094;
  --line: rgba(247, 241, 230, 0.14);
  --glass: rgba(247, 241, 230, 0.065);
  --glass-strong: rgba(247, 241, 230, 0.11);
  --acid: #d7ff42;
  --cyan: #20e7d2;
  --hot: #ff4f7b;
  --orange: #ff9f1c;
  --max: 1180px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", sans-serif;
  background:
    radial-gradient(circle at 20% 10%, rgba(215, 255, 66, 0.13), transparent 26rem),
    radial-gradient(circle at 80% 30%, rgba(32, 231, 210, 0.11), transparent 24rem),
    radial-gradient(circle at 50% 80%, rgba(255, 79, 123, 0.1), transparent 25rem),
    var(--bg);
  overflow-x: hidden;
  cursor: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(247, 241, 230, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 241, 230, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

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

button {
  font: inherit;
  cursor: none;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: #030303;
}

.loader span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--acid);
  font-family: "Syne", sans-serif;
  font-weight: 700;
  box-shadow: 0 0 70px rgba(215, 255, 66, 0.18);
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 49;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(215, 255, 66, 0.6);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 160ms ease, height 160ms ease, border-color 160ms ease;
}

.cursor.active {
  width: 54px;
  height: 54px;
  border-color: rgba(255, 79, 123, 0.8);
}

.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 20;
  width: min(calc(100% - 28px), var(--max));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 5, 5, 0.55);
  backdrop-filter: blur(18px);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.nav.scrolled {
  background: rgba(5, 5, 5, 0.82);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.logo {
  font-family: "Syne", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.nav-links {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav a {
  border-radius: var(--radius);
  transition: background 160ms ease, color 160ms ease;
}

.nav-links a,
.nav-social a {
  padding: 10px 12px;
  color: rgba(247, 241, 230, 0.72);
  font-size: 0.86rem;
  font-weight: 800;
}

.nav a:hover {
  color: var(--ink);
  background: rgba(247, 241, 230, 0.08);
}

.nav-social {
  display: flex;
  gap: 4px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(247, 241, 230, 0.06);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 116px 16px 88px;
  overflow: hidden;
  isolation: isolate;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.noise {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.025), rgba(255,255,255,0.025) 1px, transparent 1px, transparent 4px);
  opacity: 0.45;
  pointer-events: none;
}

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

.hero::before {
  inset: 11% 7% auto;
  height: 46vh;
  border: 1px solid rgba(247, 241, 230, 0.12);
  background:
    linear-gradient(90deg, transparent, rgba(215, 255, 66, 0.08), transparent),
    linear-gradient(180deg, rgba(247, 241, 230, 0.05), transparent);
  transform: skewY(-4deg);
  animation: panelDrift 7s ease-in-out infinite alternate;
}

.hero::after {
  inset: auto 12% 13%;
  height: 26vh;
  border: 1px solid rgba(32, 231, 210, 0.22);
  background: linear-gradient(115deg, transparent 18%, rgba(32, 231, 210, 0.08), rgba(255, 79, 123, 0.08), transparent 82%);
  transform: skewY(3deg);
  animation: panelDrift 8s ease-in-out infinite alternate-reverse;
}

@keyframes panelDrift {
  from {
    transform: translate3d(-10px, 0, 0) skewY(-4deg);
  }

  to {
    transform: translate3d(12px, 16px, 0) skewY(3deg);
  }
}

.hero-glitch {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 100%;
  transform: translate(-50%, -53%);
  color: transparent;
  -webkit-text-stroke: 1px rgba(247, 241, 230, 0.085);
  font-family: "Syne", sans-serif;
  font-size: clamp(5.4rem, 18vw, 17rem);
  font-weight: 800;
  line-height: 0.8;
  text-align: center;
  white-space: nowrap;
  opacity: 0.88;
  animation: glitchSlide 5.5s steps(2) infinite;
}

@keyframes glitchSlide {
  0%, 88%, 100% {
    clip-path: inset(0 0 0 0);
    transform: translate(-50%, -53%);
  }

  90% {
    clip-path: inset(18% 0 58% 0);
    transform: translate(calc(-50% - 10px), -53%);
  }

  93% {
    clip-path: inset(55% 0 18% 0);
    transform: translate(calc(-50% + 12px), -53%);
  }
}

.hero-frame {
  position: absolute;
  z-index: 2;
  inset: 92px 26px 42px;
  border: 1px solid rgba(247, 241, 230, 0.11);
  pointer-events: none;
}

.hero-frame::before,
.hero-frame::after {
  content: "";
  position: absolute;
  width: 82px;
  height: 82px;
  border-color: var(--acid);
  opacity: 0.9;
}

.hero-frame::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.hero-frame::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100%, 1080px);
  text-align: center;
}

.kicker,
.section-title span {
  color: var(--acid);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero h1 {
  min-height: clamp(5.4rem, 16vw, 12rem);
  margin: 14px 0 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(4.3rem, 15vw, 12rem);
  line-height: 0.92;
  text-shadow: 0 0 42px rgba(215, 255, 66, 0.18);
}

.typewriter {
  background: linear-gradient(90deg, var(--ink), var(--acid), var(--cyan), var(--ink));
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: textShine 4s linear infinite;
}

@keyframes textShine {
  to {
    background-position: 240% 0;
  }
}

.typewriter::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 0.82em;
  margin-left: 0.08em;
  background: var(--acid);
  animation: blink 0.8s steps(1) infinite;
  vertical-align: -0.04em;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.role {
  max-width: 760px;
  margin: 26px auto 0;
  color: rgba(247, 241, 230, 0.74);
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

.btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.btn-primary {
  color: #090909;
  background: var(--acid);
  box-shadow: 0 0 48px rgba(215, 255, 66, 0.2);
}

.btn-soft {
  border-color: var(--line);
  background: rgba(247, 241, 230, 0.07);
}

.btn:hover {
  transform: translateY(-2px);
}

.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 2;
  width: 1px;
  height: 68px;
  background: linear-gradient(to bottom, var(--acid), transparent);
  animation: pulseLine 1.5s ease-in-out infinite;
}

.skill-marquee {
  width: 100%;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(247, 241, 230, 0.045);
  transform: rotate(-1deg) scaleX(1.02);
}

.skill-marquee div {
  display: flex;
  width: max-content;
  gap: 34px;
  padding: 20px 0;
  animation: marquee 22s linear infinite;
}

.skill-marquee span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(247, 241, 230, 0.5);
  font-family: "Syne", sans-serif;
  font-size: clamp(2rem, 6vw, 5.8rem);
  font-weight: 800;
  line-height: 0.9;
  text-transform: uppercase;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@keyframes pulseLine {
  50% {
    transform: translateY(12px);
    opacity: 0.42;
  }
}

.section {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  padding: 112px 0;
  border-top: 1px solid var(--line);
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.section-title h2 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(3rem, 9vw, 7.8rem);
  line-height: 0.9;
}

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

.skill-card,
.project-card,
.contact-link {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(247, 241, 230, 0.095), rgba(247, 241, 230, 0.035));
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.skill-card::before,
.project-card::before,
.contact-link::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(120deg, transparent, rgba(215, 255, 66, 0.35), rgba(32, 231, 210, 0.28), transparent);
  opacity: 0;
  transition: opacity 180ms ease;
}

.skill-card:hover::before,
.project-card:hover::before,
.contact-link:hover::before {
  opacity: 1;
}

.skill-card span,
.project-card > *,
.contact-link > * {
  position: relative;
  z-index: 1;
}

.skill-card {
  min-height: 210px;
  padding: 22px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.skill-category {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.skill-category:nth-child(1),
.skill-category:nth-child(6) {
  grid-column: span 2;
}

.skill-category:nth-child(2n) {
  background: linear-gradient(135deg, rgba(32, 231, 210, 0.12), rgba(247, 241, 230, 0.035));
}

.skill-category:nth-child(3n) {
  background: linear-gradient(135deg, rgba(255, 79, 123, 0.12), rgba(247, 241, 230, 0.035));
}

.skill-category h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(1.35rem, 3vw, 2.35rem);
  line-height: 1;
}

.skill-category div {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.skill-card span {
  font-weight: 900;
  text-align: center;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid rgba(247, 241, 230, 0.16);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.28);
  color: rgba(247, 241, 230, 0.8);
  font-size: 0.82rem;
}

.skill-card:hover {
  transform: translateY(-6px);
  border-color: rgba(215, 255, 66, 0.48);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  perspective: 1200px;
}

.project-card {
  min-height: 330px;
  padding: 22px;
  transform-style: preserve-3d;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-card:nth-child(1),
.project-card:nth-child(8) {
  grid-column: span 2;
}

.project-card:nth-child(1) h3,
.project-card:nth-child(8) h3 {
  font-size: clamp(1.8rem, 4vw, 3.3rem);
}

.project-card:hover {
  border-color: rgba(32, 231, 210, 0.48);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

.num {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--acid);
  font-weight: 900;
}

.project-card h3 {
  margin: 0 0 14px;
  font-family: "Syne", sans-serif;
  font-size: 1.42rem;
  line-height: 1.1;
}

.project-card p {
  margin: 0;
  color: rgba(247, 241, 230, 0.68);
  line-height: 1.65;
}

.project-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.project-card div span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(247, 241, 230, 0.76);
  font-size: 0.75rem;
  font-weight: 900;
}

.project-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 38px;
  margin-top: 20px;
  padding: 0 13px;
  border: 1px solid rgba(215, 255, 66, 0.34);
  border-radius: 999px;
  color: var(--acid);
  font-size: 0.78rem;
  font-weight: 900;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.project-link:hover {
  color: #090909;
  background: var(--acid);
  transform: translateY(-2px);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.contact-link {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.contact-link:nth-child(1) {
  grid-column: span 2;
}

.contact-link:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 79, 123, 0.5);
}

.contact-link span {
  color: var(--acid);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-link strong {
  font-size: 1rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.reveal {
  opacity: 0;
}

@media (max-width: 1020px) {
  .nav {
    grid-template-columns: auto 1fr;
  }

  .nav-social {
    display: none;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card:nth-child(1),
  .project-card:nth-child(8),
  .contact-link:nth-child(1),
  .skill-category:nth-child(1),
  .skill-category:nth-child(6) {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .cursor {
    display: none;
  }

  .nav {
    top: 10px;
    width: min(calc(100% - 20px), var(--max));
    grid-template-columns: 1fr auto;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 68px;
    left: 10px;
    right: 10px;
    display: grid;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(5, 5, 5, 0.94);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links a {
    padding: 14px;
  }

  .hero {
    min-height: 92svh;
  }

  .hero-frame {
    inset: 84px 14px 34px;
  }

  .hero-glitch {
    font-size: clamp(4.6rem, 24vw, 8rem);
    white-space: normal;
  }

  .section {
    padding: 84px 0;
  }

  .section-title {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .hero h1 {
    min-height: 4.8rem;
    font-size: clamp(3.7rem, 19vw, 5.2rem);
  }

  .hero-frame::before,
  .hero-frame::after {
    width: 48px;
    height: 48px;
  }

  .hero-actions,
  .projects-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .skill-card {
    min-height: 180px;
  }
}

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

  .reveal {
    opacity: 1;
  }
}

