:root {
  --black: #050308;
  --deep-black: #09060f;
  --dark-red: #8b0000;
  --neon-red: #ff1e3c;
  --violet: #6f2cff;
  --dark-violet: #241133;
  --gold: #d6a84f;
  --text: #f4f1ea;
  --muted: #b8aebf;
  --line: rgba(244, 241, 234, 0.14);
  --glass: rgba(14, 8, 22, 0.68);
  --glass-strong: rgba(22, 10, 28, 0.78);
  --shadow-red: rgba(255, 30, 60, 0.26);
  --shadow-violet: rgba(111, 44, 255, 0.22);
  --shadow-gold: rgba(214, 168, 79, 0.18);
  --max-width: 1160px;
  --radius: 8px;
  --header-height: 76px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--black);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  text-rendering: geometricPrecision;
}

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

body::before {
  z-index: -4;
  background:
    linear-gradient(115deg, rgba(5, 3, 8, 0.96), rgba(9, 6, 15, 0.88) 44%, rgba(36, 17, 51, 0.72)),
    url("assets/bg-fallback.svg") center / cover no-repeat,
    radial-gradient(circle at 16% 20%, rgba(255, 30, 60, 0.18), transparent 32%),
    radial-gradient(circle at 82% 12%, rgba(111, 44, 255, 0.22), transparent 30%),
    radial-gradient(circle at 58% 78%, rgba(214, 168, 79, 0.13), transparent 28%),
    var(--black);
}

html.has-custom-background body::before {
  background:
    linear-gradient(115deg, rgba(5, 3, 8, 0.9), rgba(9, 6, 15, 0.84) 44%, rgba(36, 17, 51, 0.7)),
    url("assets/background.jpg") center / cover no-repeat,
    radial-gradient(circle at 16% 20%, rgba(255, 30, 60, 0.18), transparent 32%),
    radial-gradient(circle at 82% 12%, rgba(111, 44, 255, 0.22), transparent 30%),
    var(--black);
}

body::after {
  z-index: -3;
  opacity: 0.42;
  background:
    repeating-linear-gradient(90deg, transparent 0 58px, rgba(214, 168, 79, 0.045) 58px 59px),
    repeating-linear-gradient(0deg, transparent 0 42px, rgba(255, 30, 60, 0.035) 42px 43px),
    radial-gradient(ellipse at 20% 75%, rgba(244, 241, 234, 0.1), transparent 24%),
    radial-gradient(ellipse at 70% 68%, rgba(184, 174, 191, 0.08), transparent 30%);
  filter: blur(0.2px);
  animation: fog-shift 18s ease-in-out infinite alternate;
}

a {
  color: inherit;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-180%);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: var(--deep-black);
  color: var(--text);
  padding: 10px 14px;
  text-decoration: none;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.mouse-glow {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -2;
  width: 420px;
  height: 420px;
  transform: translate3d(-50%, -50%, 0);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 30, 60, 0.18), rgba(111, 44, 255, 0.1) 32%, transparent 68%);
  opacity: 0;
  transition: opacity 220ms ease;
  will-change: transform;
}

html.mouse-active .mouse-glow {
  opacity: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(244, 241, 234, 0.1);
  background: rgba(5, 3, 8, 0.82);
  padding: 12px clamp(18px, 4vw, 48px);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand__seal {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(255, 30, 60, 0.3));
}

.brand__text {
  display: grid;
  line-height: 1.1;
}

.brand__name {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand__title {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
  padding: 10px 12px;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  border-color: rgba(214, 168, 79, 0.35);
  background: rgba(214, 168, 79, 0.08);
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(214, 168, 79, 0.28);
  border-radius: var(--radius);
  background: rgba(14, 8, 22, 0.72);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

main {
  position: relative;
}

main::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 30, 60, 0.08), transparent 22%),
    linear-gradient(90deg, transparent, rgba(214, 168, 79, 0.06), transparent);
  content: "";
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 78%, transparent);
}

.section {
  width: min(100% - 36px, var(--max-width));
  margin: 0 auto;
  padding: clamp(72px, 9vw, 120px) 0;
}

.hero {
  display: grid;
  min-height: calc(92vh - var(--header-height));
  align-items: center;
  padding-top: clamp(48px, 7vw, 86px);
  padding-bottom: clamp(56px, 8vw, 96px);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.75fr);
  align-items: center;
  gap: clamp(36px, 6vw, 72px);
}

.hero__copy {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 10px;
  color: var(--text);
  font-size: clamp(3.8rem, 10vw, 8.8rem);
  line-height: 0.88;
  letter-spacing: 0;
  text-shadow:
    0 0 18px rgba(255, 30, 60, 0.24),
    0 0 48px rgba(111, 44, 255, 0.18);
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4.5vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.16rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero__title {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 850;
  line-height: 1.1;
  text-shadow: 0 0 24px rgba(214, 168, 79, 0.2);
}

.hero__roles {
  max-width: 760px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.8vw, 1.2rem);
  font-weight: 700;
}

.hero__description {
  max-width: 680px;
  margin-bottom: 30px;
  color: rgba(244, 241, 234, 0.86);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
}

.hero__actions,
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(244, 241, 234, 0.14);
  border-radius: var(--radius);
  padding: 12px 17px;
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

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

.button--primary {
  border-color: rgba(255, 30, 60, 0.62);
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.86), rgba(255, 30, 60, 0.74));
  box-shadow: 0 16px 38px rgba(255, 30, 60, 0.16);
}

.button--ghost {
  background: rgba(14, 8, 22, 0.66);
  box-shadow: inset 0 0 0 1px rgba(111, 44, 255, 0.18);
}

.button--gold {
  border-color: rgba(214, 168, 79, 0.62);
  background: rgba(214, 168, 79, 0.1);
  color: #ffe3a4;
}

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

.character-frame {
  position: relative;
  display: grid;
  width: min(100%, 460px);
  min-height: min(70vh, 650px);
  place-items: end center;
  isolation: isolate;
}

.character-frame::before {
  position: absolute;
  inset: 10% 4% 0;
  z-index: -2;
  border: 1px solid rgba(214, 168, 79, 0.25);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(244, 241, 234, 0.08), transparent 38%),
    radial-gradient(circle at 50% 18%, rgba(255, 30, 60, 0.2), transparent 42%),
    rgba(5, 3, 8, 0.34);
  box-shadow:
    inset 0 0 0 1px rgba(255, 30, 60, 0.1),
    0 34px 90px rgba(0, 0, 0, 0.42);
  content: "";
}

.character-frame::after {
  position: absolute;
  right: 8%;
  bottom: 4%;
  left: 8%;
  z-index: -1;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.64), transparent 70%);
  filter: blur(5px);
  content: "";
}

.character-frame__aura {
  position: absolute;
  inset: 3% 0 7%;
  z-index: -1;
  border-radius: 50%;
  background:
    conic-gradient(from 140deg, transparent, rgba(255, 30, 60, 0.42), rgba(214, 168, 79, 0.34), rgba(111, 44, 255, 0.38), transparent),
    radial-gradient(circle, rgba(255, 30, 60, 0.24), transparent 62%);
  filter: blur(24px);
  opacity: 0.62;
  animation: neon-breathe 3.6s ease-in-out infinite;
}

.character-frame__avatar {
  position: relative;
  z-index: 2;
  width: auto;
  height: min(72vh, 650px);
  max-width: min(110%, 500px);
  object-fit: contain;
  filter:
    drop-shadow(0 28px 34px rgba(0, 0, 0, 0.56))
    drop-shadow(0 0 28px rgba(255, 30, 60, 0.18));
}

.character-frame__logo {
  position: absolute;
  right: -22px;
  bottom: 8%;
  z-index: 3;
  width: min(48%, 220px);
  height: auto;
  object-fit: contain;
  filter:
    drop-shadow(0 10px 24px rgba(0, 0, 0, 0.46))
    drop-shadow(0 0 18px rgba(214, 168, 79, 0.24));
}

.section__heading {
  max-width: 720px;
  margin-bottom: 30px;
}

.section__heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
}

.social-grid,
.project-grid {
  display: grid;
  gap: 14px;
}

.social-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.social-card,
.project-card,
.feature-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(244, 241, 234, 0.06), transparent 28%),
    var(--glass);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.social-card {
  position: relative;
  display: grid;
  min-height: 178px;
  align-content: space-between;
  gap: 18px;
  overflow: hidden;
  padding: 18px;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.social-card::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 30, 60, 0.14), transparent 38%),
    radial-gradient(circle at 86% 14%, rgba(111, 44, 255, 0.24), transparent 32%);
  opacity: 0;
  transition: opacity 180ms ease;
  content: "";
}

.social-card:hover,
.social-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 30, 60, 0.46);
  box-shadow: 0 26px 70px rgba(255, 30, 60, 0.13), 0 0 0 1px rgba(214, 168, 79, 0.1);
}

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

.social-card__mark,
.social-card__body,
.social-card__arrow {
  position: relative;
  z-index: 1;
}

.social-card__mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(214, 168, 79, 0.42);
  border-radius: 50%;
  background: rgba(5, 3, 8, 0.56);
  color: #ffe3a4;
  font-size: 0.78rem;
  font-weight: 900;
}

.social-card__body {
  display: grid;
  gap: 7px;
}

.social-card__body strong {
  font-size: 1.04rem;
  line-height: 1.2;
}

.social-card__body span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.social-card__arrow {
  justify-self: end;
  color: var(--gold);
  font-weight: 900;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(24px, 5vw, 54px);
  align-items: start;
}

.about__text {
  max-width: 720px;
}

.about__text p:not(.eyebrow) {
  color: rgba(244, 241, 234, 0.88);
  font-size: clamp(1.04rem, 1.6vw, 1.18rem);
}

.about__text .about__lead {
  margin-bottom: 12px;
  color: var(--gold);
  font-weight: 850;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.tag-row span {
  border: 1px solid rgba(214, 168, 79, 0.34);
  border-radius: var(--radius);
  background: rgba(214, 168, 79, 0.09);
  color: #ffe3a4;
  padding: 9px 11px;
  font-size: 0.9rem;
  font-weight: 800;
}

.feature-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 20px;
  list-style: none;
}

.feature-list li {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(244, 241, 234, 0.08);
  padding: 0 0 12px;
}

.feature-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.feature-list span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 30, 60, 0.13);
}

.feature-list strong {
  line-height: 1.25;
}

.reference-panel {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(214, 168, 79, 0.26);
  border-radius: var(--radius);
  background: rgba(5, 3, 8, 0.72);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
}

.reference-panel::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 3, 8, 0.36), transparent 18%, transparent 82%, rgba(5, 3, 8, 0.4)),
    linear-gradient(180deg, transparent 70%, rgba(5, 3, 8, 0.44));
  content: "";
}

.reference-panel img {
  width: 100%;
  aspect-ratio: 2400 / 933;
  object-fit: cover;
  object-position: center;
}

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

.project-card {
  position: relative;
  overflow: hidden;
  min-height: 218px;
  padding: 20px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(214, 168, 79, 0.34);
  box-shadow: 0 24px 68px rgba(111, 44, 255, 0.12);
}

.project-card__line {
  display: block;
  width: 54px;
  height: 2px;
  margin-bottom: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--neon-red), var(--gold));
  box-shadow: 0 0 18px rgba(255, 30, 60, 0.34);
}

.project-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.project-card--subtle {
  background:
    linear-gradient(135deg, rgba(214, 168, 79, 0.06), transparent 30%),
    rgba(14, 8, 22, 0.58);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  border-top: 1px solid rgba(214, 168, 79, 0.22);
  border-bottom: 1px solid rgba(255, 30, 60, 0.18);
  background:
    linear-gradient(90deg, rgba(255, 30, 60, 0.08), transparent 48%, rgba(214, 168, 79, 0.07)),
    rgba(5, 3, 8, 0.36);
  padding: clamp(24px, 4vw, 38px);
}

.contact__copy {
  max-width: 740px;
}

.contact__copy p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.contact__actions {
  justify-content: flex-end;
}

.site-footer {
  width: min(100% - 36px, var(--max-width));
  margin: 0 auto;
  border-top: 1px solid rgba(244, 241, 234, 0.1);
  padding: 28px 0 42px;
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer p + p {
  margin-top: 8px;
  font-size: 0.92rem;
}

.js-ready .reveal {
  transform: translateY(16px);
  opacity: 0;
  transition: opacity 560ms ease, transform 560ms ease;
}

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

@keyframes fog-shift {
  from {
    transform: translate3d(-1.2%, -0.6%, 0) scale(1);
  }
  to {
    transform: translate3d(1.4%, 0.8%, 0) scale(1.03);
  }
}

@keyframes neon-breathe {
  0%,
  100% {
    opacity: 0.46;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.78;
    transform: scale(1.02);
  }
}

@keyframes slow-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1180px) {
  .social-grid,
  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    gap: 14px;
  }

  .nav-toggle {
    display: inline-grid;
    flex: 0 0 auto;
  }

  .site-nav {
    position: absolute;
    top: calc(100% - 1px);
    right: 18px;
    left: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid rgba(244, 241, 234, 0.1);
    border-radius: var(--radius);
    background: rgba(5, 3, 8, 0.96);
    padding: 10px;
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.42);
  }

  .js-ready .site-nav {
    transform: translateY(-8px);
    visibility: hidden;
    opacity: 0;
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  }

  .js-ready.nav-open .site-nav {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
  }

  .js-ready.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .js-ready.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .js-ready.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .hero__inner,
  .about,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    order: -1;
  }

  .character-frame {
    width: min(86vw, 360px);
    min-height: min(62vh, 520px);
  }

  .character-frame__avatar {
    height: min(58vh, 520px);
    max-width: 112%;
  }

  .character-frame__logo {
    right: -10px;
    width: min(46%, 170px);
  }

  .contact__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 68px;
  }

  .section {
    width: min(100% - 28px, var(--max-width));
    padding: 62px 0;
  }

  .site-header {
    padding-inline: 14px;
  }

  .brand__title {
    display: none;
  }

  .site-nav {
    right: 14px;
    left: 14px;
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(3.1rem, 17vw, 4.8rem);
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .hero__actions,
  .contact__actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

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

  .social-card,
  .project-card {
    min-height: 0;
  }

  .feature-list {
    padding: 16px;
  }

  .contact {
    padding: 20px;
  }
}

@media (pointer: coarse), (max-width: 860px) {
  .mouse-glow {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .js-ready .reveal {
    transform: none;
    opacity: 1;
  }
}
