:root {
  --bg: #070809;
  --bg-elevated: #0e1012;
  --surface: #14171a;
  --text: #eceae6;
  --muted: #8b9198;
  --accent: #e8ff47;
  --accent-dim: rgba(232, 255, 71, 0.12);
  --line: rgba(236, 234, 230, 0.08);
  --line-strong: rgba(236, 234, 230, 0.16);
  --danger: #ff6b5a;
  --font-display: "Syne", sans-serif;
  --font-body: "Manrope", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 4.5rem;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

body.is-loading {
  overflow: hidden;
}

@media (hover: none), (pointer: coarse) {
  body {
    cursor: auto;
  }
  .cursor,
  .cursor-trail {
    display: none !important;
  }
}

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

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

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

::selection {
  background: var(--accent);
  color: #0a0a0a;
}

/* ——— Cursor ——— */
.cursor,
.cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10000;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform, width, height;
}

.cursor {
  width: 10px;
  height: 10px;
  background: var(--accent);
  mix-blend-mode: difference;
  transition: width 0.25s var(--ease), height 0.25s var(--ease), background 0.25s;
}

.cursor.is-hover {
  width: 48px;
  height: 48px;
  background: transparent;
  border: 1.5px solid var(--accent);
  mix-blend-mode: normal;
}

.cursor-trail {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(232, 255, 71, 0.35);
  transition: width 0.4s var(--ease), height 0.4s var(--ease), opacity 0.3s;
  opacity: 0.7;
}

.cursor-trail.is-hover {
  width: 64px;
  height: 64px;
  opacity: 0.35;
}

/* ——— Canvas ——— */
#grid-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

/* ——— Loader ——— */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: grid;
  place-items: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}

.loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__inner {
  width: min(280px, 70vw);
  text-align: center;
}

.loader__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 1.25rem;
}

.loader__bar {
  height: 2px;
  background: var(--line-strong);
  overflow: hidden;
  border-radius: 2px;
}

.loader__progress {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}

.loader__count {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ——— Nav ——— */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: linear-gradient(to bottom, rgba(7, 8, 9, 0.92), transparent);
  backdrop-filter: blur(0px);
  transition: background 0.35s, backdrop-filter 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(7, 8, 9, 0.85);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 102;
  color: var(--accent);
}

.nav__links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  transition: color 0.25s;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.35s var(--ease);
}

.nav__links a:hover,
.nav__links a.is-active {
  color: var(--text);
}

.nav__links a:hover::after,
.nav__links a.is-active::after {
  width: 100%;
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  width: 2rem;
  height: 1.25rem;
  position: relative;
  z-index: 102;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  position: absolute;
  left: 0;
  transition: transform 0.35s var(--ease), top 0.35s var(--ease), opacity 0.2s;
}

.nav__toggle span:first-child {
  top: 0.25rem;
}

.nav__toggle span:last-child {
  top: 0.85rem;
}

.nav__toggle.is-open span:first-child {
  top: 0.55rem;
  transform: rotate(45deg);
}

.nav__toggle.is-open span:last-child {
  top: 0.55rem;
  transform: rotate(-45deg);
}

@media (max-width: 768px) {
  .nav__toggle {
    display: block;
  }

  .nav__links {
    position: fixed;
    inset: 0;
    background: rgba(7, 8, 9, 0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
    z-index: 101;
  }

  .nav__links.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav__links a {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
  }
}

/* ——— Hero ——— */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 2rem) clamp(1.25rem, 4vw, 3rem) 6rem;
  overflow: hidden;
}

.hero__noise {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__content {
  position: relative;
  max-width: 920px;
  z-index: 2;
}

.hero__eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.5rem, 12vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin-bottom: 1.75rem;
}

.reveal-line {
  display: block;
  overflow: hidden;
}

.reveal-line span {
  display: block;
  transform: translateY(110%);
  transition: transform 1s var(--ease);
}

.hero.is-ready .reveal-line span {
  transform: translateY(0);
}

.reveal-line:nth-child(2) span {
  transition-delay: 0.12s;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
}

.hero.is-ready .reveal-line:nth-child(2) span:hover {
  color: var(--accent);
  -webkit-text-stroke: 1.5px var(--accent);
  transition: color 0.35s, -webkit-text-stroke 0.35s;
}

.hero__lead {
  max-width: 34rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  margin-bottom: 2.25rem;
  font-weight: 500;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero__scroll {
  position: absolute;
  bottom: 7rem;
  right: clamp(1.25rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  z-index: 2;
}

.hero__scroll span {
  writing-mode: vertical-rl;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%,
  100% {
    transform: scaleY(0.6);
    opacity: 0.4;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.hero__marquee {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-top: 1px solid var(--line);
  background: rgba(14, 16, 18, 0.6);
  backdrop-filter: blur(8px);
  overflow: hidden;
  z-index: 2;
}

.marquee__track {
  display: flex;
  gap: 3rem;
  padding: 1rem 0;
  width: max-content;
  animation: marquee 28s linear infinite;
}

.marquee__track span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.marquee__track span::before {
  content: "◆";
  color: var(--accent);
  margin-right: 3rem;
  font-size: 0.55rem;
  vertical-align: middle;
}

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

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
  cursor: none;
}

@media (hover: none), (pointer: coarse) {
  .btn {
    cursor: pointer;
  }
}

.btn--primary {
  background: var(--accent);
  color: #0a0a0a;
}

.btn--primary:hover {
  background: #f3ff7a;
}

.btn--ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ——— Sections ——— */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(5rem, 12vw, 9rem) clamp(1.25rem, 4vw, 3rem);
}

.section__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 14ch;
  margin-bottom: 1.25rem;
}

.section__split {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.6fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.section__intro {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}

.section__aside {
  color: var(--muted);
  font-size: 1rem;
  max-width: 28ch;
  line-height: 1.65;
}

@media (max-width: 900px) {
  .section__split {
    grid-template-columns: 1fr;
  }

  .section__intro {
    position: static;
  }

  .section__title {
    max-width: none;
  }

  .section__aside {
    max-width: 40rem;
    margin-bottom: 0.5rem;
  }
}

/* ——— About ——— */
.section__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.about__sticky {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}

.about__text {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  max-width: 42rem;
}

.about__text + .about__text {
  margin-bottom: 3rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.stat__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
}

.stat__suffix {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--accent);
}

.stat__label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 900px) {
  .section__grid {
    grid-template-columns: 1fr;
  }

  .about__sticky {
    position: static;
  }

  .stat-row {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

/* ——— Experience ——— */
.timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: none;
}

.timeline__item {
  position: relative;
  padding: 1.5rem 1.35rem 1.5rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elevated);
  transition: background 0.35s, border-color 0.35s, transform 0.35s var(--ease);
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 1.75rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--muted);
  transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}

.timeline__item:hover::before,
.timeline__item.is-active::before {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.35);
  box-shadow: 0 0 20px rgba(232, 255, 71, 0.45);
}

.timeline__item:hover,
.timeline__item.is-active {
  border-color: rgba(232, 255, 71, 0.35);
  background: linear-gradient(145deg, var(--accent-dim), var(--bg-elevated) 55%);
  transform: translateY(-3px);
}

.timeline__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  margin-bottom: 0.4rem;
  padding-left: 0.85rem;
}

.timeline__role {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.timeline__date {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.timeline__company {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
  padding-left: 0.85rem;
  transition: color 0.3s;
}

.timeline__item:hover .timeline__company {
  color: var(--accent);
}

.timeline__desc {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: none;
  margin-bottom: 1rem;
  padding-left: 0.85rem;
}

.timeline__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-left: 0.85rem;
}

.timeline__tags span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  transition: border-color 0.25s, color 0.25s;
}

.timeline__item:hover .timeline__tags span {
  border-color: rgba(232, 255, 71, 0.35);
  color: var(--text);
}

@media (max-width: 700px) {
  .timeline {
    grid-template-columns: 1fr;
  }
}

/* ——— Projects ——— */
.projects__head {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: end;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.projects__head .section__title {
  margin-bottom: 0;
  max-width: 14ch;
}

.projects__lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36rem;
  padding-bottom: 0.25rem;
}

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

.project-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-elevated);
  transition: border-color 0.35s, transform 0.35s var(--ease), box-shadow 0.35s;
  cursor: none;
  outline: none;
}

@media (hover: none), (pointer: coarse) {
  .project-card {
    cursor: pointer;
  }
}

.project-card:hover,
.project-card:focus-visible,
.project-card.is-discovered {
  border-color: rgba(232, 255, 71, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.project-card__visual {
  position: relative;
  min-height: 160px;
  padding: 1.25rem;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.project-card__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.9;
  background:
    linear-gradient(135deg, rgba(7, 8, 9, 0.15), rgba(7, 8, 9, 0.75)),
    repeating-linear-gradient(
      -12deg,
      transparent 0 14px,
      rgba(255, 255, 255, 0.03) 14px 15px
    );
}

.project-card__visual--a {
  background: linear-gradient(135deg, #1a2210 0%, #3d4f12 45%, #e8ff47 140%);
}

.project-card__visual--b {
  background: linear-gradient(145deg, #12151a 0%, #2a3340 50%, #7ec8ff 130%);
}

.project-card__visual--c {
  background: linear-gradient(150deg, #1a1214 0%, #5a2030 50%, #ff7a59 130%);
}

.project-card__visual--d {
  background: linear-gradient(140deg, #10141c 0%, #1e3a5f 55%, #5ee0c5 140%);
}

.project-card__index {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.5rem;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1;
}

.project-card__body {
  padding: 1.35rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.project-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-card__xp {
  color: var(--accent);
  opacity: 0.85;
  transition: opacity 0.25s;
}

.project-card.is-discovered .project-card__xp {
  opacity: 0.35;
  text-decoration: line-through;
}

.project-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.project-card__desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
  flex: 1;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.project-card__tags span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .projects__head {
    grid-template-columns: 1fr;
  }

  .projects__head .section__title {
    max-width: none;
  }
}

@media (max-width: 700px) {
  .projects__grid {
    grid-template-columns: 1fr;
  }
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.contact__form .btn:disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* ——— Skills ——— */
.section__split--skills {
  align-items: stretch;
}

.section__split--skills .section__intro {
  position: static;
}

.skills__orbit {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
  margin-bottom: 0;
  max-width: none;
}

.skill-chip {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: none;
  transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.35s var(--ease);
}

@media (hover: none), (pointer: coarse) {
  .skill-chip {
    cursor: pointer;
  }
}

.skill-chip:hover,
.skill-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0a;
  transform: translateY(-3px) scale(1.04);
}

.skill-detail {
  position: relative;
  min-height: 100%;
  align-self: stretch;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 16px;
  max-width: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: border-color 0.35s, box-shadow 0.35s;
  transform: none;
}

.skill-detail.is-live {
  border-color: rgba(232, 255, 71, 0.35);
  box-shadow: 0 0 40px rgba(232, 255, 71, 0.06);
}

.skill-detail__hint {
  color: var(--muted);
  font-size: 1rem;
}

.skill-detail__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s, transform 0.35s var(--ease);
}

.skill-detail__text {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 40rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s 0.05s, transform 0.35s 0.05s var(--ease);
}

.skill-detail.is-live .skill-detail__hint {
  display: none;
}

.skill-detail.is-live .skill-detail__title,
.skill-detail.is-live .skill-detail__text {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .skill-detail {
    min-height: 10rem;
  }
}

/* ——— Contact ——— */
.contact__panel {
  max-width: none;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding: clamp(2rem, 5vw, 3.5rem);
  background:
    radial-gradient(ellipse at top right, rgba(232, 255, 71, 0.08), transparent 50%),
    var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
}

.contact__copy {
  padding-right: 0.5rem;
}

.contact__direct {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0 0 1.75rem;
  padding: 0;
}

.contact__direct li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact__direct span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact__direct a {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 600;
  color: var(--text);
  transition: color 0.25s;
  width: fit-content;
}

.contact__direct a:hover {
  color: var(--accent);
}

.contact__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  max-width: 14ch;
}

.contact__lead {
  color: var(--muted);
  margin-bottom: 1.75rem;
  max-width: 36rem;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.contact__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  border-top: none;
  padding-top: 0;
  border-left: 1px solid var(--line);
  padding-left: clamp(1.5rem, 4vw, 2.5rem);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  resize: vertical;
  cursor: text;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-status {
  grid-column: 1 / -1;
  font-size: 0.9rem;
  min-height: 1.4em;
  color: var(--accent);
}

.form-status.is-error {
  color: var(--danger);
}

@media (max-width: 900px) {
  .contact__panel {
    grid-template-columns: 1fr;
  }

  .contact__title {
    max-width: none;
  }

  .contact__actions {
    margin-bottom: 0.5rem;
  }

  .contact__form {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 2rem;
  }
}

@media (max-width: 600px) {
  .contact__form {
    grid-template-columns: 1fr;
  }
}

/* ——— Footer ——— */
.footer {
  position: relative;
  z-index: 1;
  overflow: hidden;
  margin-top: 2rem;
  padding: clamp(3rem, 8vw, 5rem) clamp(1.25rem, 4vw, 3rem) calc(5.5rem + 1.25rem);
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, transparent, rgba(232, 255, 71, 0.03) 40%, rgba(14, 16, 18, 0.9)),
    var(--bg);
}

.footer__glow {
  position: absolute;
  left: 50%;
  top: -40%;
  width: min(720px, 90vw);
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(232, 255, 71, 0.1), transparent 68%);
  pointer-events: none;
}

.footer__top {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr auto 1.2fr;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.footer__mark {
  display: inline-flex;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.5rem, 10vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
  transition: color 0.35s, -webkit-text-stroke 0.35s;
}

.footer__mark:hover {
  color: var(--accent);
  -webkit-text-stroke: 1.5px var(--accent);
}

.footer__tag {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 18rem;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: 0.5rem;
}

.footer__nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--muted);
  transition: color 0.25s, transform 0.25s var(--ease);
  width: fit-content;
}

.footer__nav a:hover {
  color: var(--accent);
}

.footer__connect {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer__chip {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(14, 16, 18, 0.65);
  transition: border-color 0.3s, background 0.3s, transform 0.35s var(--ease);
}

.footer__chip span {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer__chip:hover {
  border-color: rgba(232, 255, 71, 0.4);
  background: var(--accent-dim);
}

.footer__chip--accent {
  border-color: rgba(232, 255, 71, 0.35);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
}

.footer__marquee {
  position: relative;
  margin: 0 calc(-1 * clamp(1.25rem, 4vw, 3rem)) clamp(1.75rem, 4vw, 2.5rem);
  padding: 1rem 0;
  border-block: 1px solid var(--line);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.footer__marquee-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: footerMarquee 32s linear infinite;
}

.footer__marquee-track span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(236, 234, 230, 0.18);
  white-space: nowrap;
}

.footer__marquee-track span::after {
  content: "◆";
  margin-left: 2.5rem;
  color: var(--accent);
  font-size: 0.55em;
  vertical-align: middle;
  opacity: 0.7;
}

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

.footer__bottom {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.footer__status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 500;
}

.footer__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(232, 255, 71, 0.55);
  animation: statusPulse 2s ease-out infinite;
}

@keyframes statusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(232, 255, 71, 0.55);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(232, 255, 71, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(232, 255, 71, 0);
  }
}

.footer__top-link {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  transition: color 0.25s;
}

.footer__top-link:hover {
  color: var(--accent);
}

@media (max-width: 900px) {
  .footer__top {
    grid-template-columns: 1fr 1fr;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .footer__top {
    grid-template-columns: 1fr;
  }

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

/* ——— Reveal animations ——— */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

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

.reveal[data-delay="200"] {
  transition-delay: 0.2s;
}

.reveal[data-delay="320"] {
  transition-delay: 0.32s;
}

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

  .reveal,
  .reveal-line span {
    opacity: 1;
    transform: none;
  }

  body {
    cursor: auto;
  }

  .cursor,
  .cursor-trail {
    display: none !important;
  }
}

/* ——— Game HUD ——— */
.hud {
  position: fixed;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  z-index: 200;
  width: min(640px, calc(100vw - 1.5rem));
  pointer-events: none;
}

.hud__bar,
.quest-panel,
.hud__quest-btn {
  pointer-events: auto;
}

.hud__bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.7rem 0.85rem;
  background: rgba(10, 12, 14, 0.88);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.hud__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.hud__identity {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 4.5rem;
}

.hud__rank {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  line-height: 1.1;
}

.hud__level {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.hud__xp-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.hud__xp-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.hud__xp-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b8d62a, var(--accent));
  box-shadow: 0 0 12px rgba(232, 255, 71, 0.45);
  transition: width 0.55s var(--ease);
}

.hud__xp-text {
  font-size: 0.65rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud__quest-btn {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: none;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}

@media (hover: none), (pointer: coarse) {
  .hud__quest-btn {
    cursor: pointer;
  }
}

.hud__quest-btn:hover,
.hud__quest-btn.is-open {
  border-color: var(--accent);
  color: var(--accent);
}

.hud__quest-btn span {
  color: var(--muted);
  margin-left: 0.25rem;
}

.quest-panel {
  margin-bottom: 0.55rem;
  padding: 1rem 1.1rem;
  background: rgba(10, 12, 14, 0.94);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  animation: questIn 0.35s var(--ease);
}

.quest-panel[hidden] {
  display: none;
}

@keyframes questIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quest-panel__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.quest-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.quest-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: start;
  font-size: 0.82rem;
  color: var(--muted);
  transition: color 0.25s;
}

.quest-list li.is-done {
  color: var(--text);
}

.quest-list li.is-done span:nth-child(2) {
  text-decoration: line-through;
  opacity: 0.7;
}

.quest-list em {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
}

.quest-check {
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  border-radius: 4px;
  border: 1.5px solid var(--line-strong);
  background: transparent;
  position: relative;
  flex-shrink: 0;
}

.quest-list li.is-done .quest-check {
  border-color: var(--accent);
  background: var(--accent);
}

.quest-list li.is-done .quest-check::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 4px;
  height: 7px;
  border: solid #0a0a0a;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.quest-panel__hint {
  margin-top: 0.85rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.quest-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.hud-ctrl {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: none;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}

@media (hover: none), (pointer: coarse) {
  .hud-ctrl {
    cursor: pointer;
  }
}

.hud-ctrl:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hud-ctrl.is-muted {
  color: var(--muted);
}

.hud-ctrl--danger:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.toast-stack {
  position: fixed;
  top: calc(var(--nav-h) + 0.75rem);
  right: clamp(0.75rem, 3vw, 1.5rem);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: min(300px, calc(100vw - 1.5rem));
  pointer-events: none;
}

.toast {
  position: relative;
  overflow: hidden;
  padding: 0.9rem 1rem;
  background: rgba(14, 16, 18, 0.95);
  border: 1px solid rgba(232, 255, 71, 0.35);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateX(24px) scale(0.96);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.toast.is-in {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.toast.is-out {
  opacity: 0;
  transform: translateX(16px) scale(0.98);
}

.toast__glow {
  position: absolute;
  inset: auto -20% -40% auto;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(232, 255, 71, 0.2), transparent 65%);
  pointer-events: none;
}

.toast__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
  position: relative;
}

.toast__detail {
  font-size: 0.78rem;
  color: var(--muted);
  position: relative;
}

.toast__xp {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent);
  position: relative;
}

.levelup {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  background: rgba(7, 8, 9, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s, visibility 0.35s;
}

.levelup.is-on {
  opacity: 1;
  visibility: visible;
}

.levelup__card {
  text-align: center;
  padding: 2rem 2.5rem;
  border: 1px solid rgba(232, 255, 71, 0.45);
  border-radius: 16px;
  background: var(--bg-elevated);
  transform: scale(0.86);
  transition: transform 0.45s var(--ease);
  box-shadow: 0 0 60px rgba(232, 255, 71, 0.12);
}

.levelup.is-on .levelup__card {
  transform: scale(1);
}

.levelup__label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.levelup__value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 5rem);
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}

.levelup__rank {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.skill-chip {
  position: relative;
  padding-right: 1.5rem;
}

.skill-chip__xp {
  position: absolute;
  top: -0.45rem;
  right: -0.15rem;
  font-size: 0.6rem;
  font-weight: 800;
  font-family: var(--font-body);
  color: #0a0a0a;
  background: var(--accent);
  padding: 0.12rem 0.35rem;
  border-radius: 999px;
  opacity: 1;
  transition: opacity 0.25s, transform 0.25s;
}

.skill-chip.is-unlocked .skill-chip__xp {
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}

.skill-chip.is-unlocked {
  border-color: rgba(232, 255, 71, 0.45);
  box-shadow: inset 0 0 0 1px rgba(232, 255, 71, 0.12);
}

.skill-chip.is-unlocked::after {
  content: "✓";
  margin-left: 0.35rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.skill-chip.is-unlocked.is-active::after {
  color: #0a0a0a;
}

.timeline__item.is-discovered {
  border-color: rgba(232, 255, 71, 0.28);
}

.timeline__item.is-discovered::after {
  content: "+10 XP";
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.85;
}

body {
  padding-bottom: 5.5rem;
}

@media (max-width: 640px) {
  .hud__bar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "id quest"
      "xp xp";
    gap: 0.55rem 0.75rem;
  }

  .hud__identity {
    grid-area: id;
  }

  .hud__xp-wrap {
    grid-area: xp;
  }

  .hud__actions {
    grid-area: quest;
  }

  .timeline__item.is-discovered::after {
    display: none;
  }
}

.reduce-game-motion .toast,
.reduce-game-motion .levelup,
.reduce-game-motion .quest-panel {
  transition: none !important;
  animation: none !important;
}

/* ——— Services page (no cursor/game scripts) ——— */
.page-plain,
.page-plain .btn,
.page-plain .project-card {
  cursor: auto;
}

.page-plain a,
.page-plain summary {
  cursor: pointer;
}

.page-hero {
  min-height: 75vh;
}

.page-hero .hero__title {
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 1;
}

.breadcrumb {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.faq details {
  max-width: 48rem;
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
}

.faq summary {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}

.faq details p {
  color: var(--muted);
  margin-top: 0.75rem;
}

.text-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ——— Blog ——— */
.page-head {
  padding-top: calc(var(--nav-h) + 3rem);
  padding-bottom: 0;
}

.section--tight {
  padding-top: 2.5rem;
}

.prose {
  max-width: 46rem;
  margin: 0 auto;
  padding-bottom: clamp(4rem, 10vw, 7rem);
}

.prose h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  letter-spacing: -0.02em;
  margin: 2.5rem 0 0.75rem;
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.prose p + p {
  margin-top: 1rem;
}

.prose ul {
  padding-left: 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.prose strong {
  color: var(--text);
}

.prose a:not(.btn) {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose code {
  font-size: 0.9em;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
}

.post-meta {
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

.post-cta {
  margin-top: 3.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--bg-elevated);
}

.post-cta h2 {
  margin-top: 0;
}

.post-cta .btn {
  margin-top: 1.25rem;
}

.prose pre {
  margin: 1.25rem 0;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.85rem;
  line-height: 1.6;
}

.prose pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}

.table-wrap {
  margin: 1.25rem 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.prose th {
  color: var(--text);
  font-weight: 700;
  background: var(--surface);
}

.prose tr:last-child td {
  border-bottom: none;
}

.prose td:last-child {
  color: var(--text);
  white-space: nowrap;
}

.prose .note {
  font-size: 0.9rem;
}
