/* Javier Caceres — Portfolio */

:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --surface: #161622;
  --surface-hover: #1a1a28;
  --line: rgba(139, 92, 246, 0.16);
  --line-strong: rgba(167, 139, 250, 0.32);
  --text: #ffffff;
  --muted: #9ca3af;
  --accent: #8b5cf6;
  --accent-2: #a78bfa;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --accent-glow: rgba(139, 92, 246, 0.4);
  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --radius: 1.1rem;
  --nav-h: 4.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 72rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--muted);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  selection-background: var(--accent);
}

::selection {
  background: var(--accent);
  color: white;
}

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

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

button {
  font: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* ---------- Ambient background ---------- */
.fx-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 80% 8%, rgba(139, 92, 246, 0.16), transparent 55%),
    radial-gradient(ellipse 40% 35% at 8% 70%, rgba(167, 139, 250, 0.07), transparent 50%),
    linear-gradient(180deg, #05050a 0%, #080812 45%, #05050a 100%);
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.02;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(0, 0, 0, 0.45) 4px,
    transparent 5px
  );
  mix-blend-mode: overlay;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}

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

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.nav__mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: white;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.3s var(--ease);
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.25);
}

.nav__brand:hover .nav__mark {
  transform: scale(1.05);
}

.nav__links {
  display: none;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav__links a {
  position: relative;
  padding-block: 0.25rem;
  transition: color 0.25s;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 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 {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__cta {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.65rem;
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: border-color 0.25s, background 0.25s;
}

.nav__cta:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.nav__toggle {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--text);
  font-size: 1.25rem;
}

.nav__toggle[aria-expanded="true"] .fa-bars {
  display: none;
}

.nav__toggle[aria-expanded="false"] .fa-xmark,
.nav__toggle:not([aria-expanded="true"]) .fa-xmark {
  display: none;
}

.nav__toggle[aria-expanded="true"] .fa-xmark {
  display: block;
}

.nav__mobile {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: rgba(7, 7, 11, 0.96);
  backdrop-filter: blur(20px);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
  z-index: 99;
}

.nav__mobile.is-open {
  transform: translateX(0);
}

.nav__mobile a {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

@media (min-width: 900px) {
  .nav__links,
  .nav__cta {
    display: flex;
  }

  .nav__toggle {
    display: none;
  }
}

/* Mobile polish */
@media (max-width: 699px) {
  .container {
    width: min(100% - 1.5rem, var(--max));
  }

  .hero {
    padding-top: calc(var(--nav-h) + 1.5rem);
    padding-bottom: 3rem;
    min-height: auto;
  }

  .hero__title {
    font-size: clamp(2.4rem, 12vw, 3.2rem);
  }

  .hero__actions {
    width: 100%;
  }

  .hero__actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .hero__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .hero__socials {
    margin-left: 0;
  }

  .hero__visual {
    width: min(100%, 20rem);
    margin-inline: auto;
  }

  .about__grid,
  .split,
  .skills-grid {
    gap: 2rem;
  }

  .section__title {
    max-width: none;
  }

  .project {
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
  }

  .project__arrow {
    display: none;
  }

  .footer__top {
    text-align: center;
  }

  .footer__actions {
    align-items: center !important;
  }

  body {
    padding-bottom: 3.5rem; /* room for walking kitty */
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  border-radius: 0.7rem;
  font-weight: 550;
  font-size: 0.9375rem;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

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

.btn--primary {
  background: linear-gradient(135deg, #8b5cf6, #6d5ce8 55%, #a78bfa);
  background-size: 160% 160%;
  color: white;
  box-shadow: 0 12px 32px -12px var(--accent-glow);
  animation: btn-shift 8s ease infinite;
}

.btn--primary:hover {
  filter: brightness(1.06);
}

@keyframes btn-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.btn--ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

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

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: calc(var(--nav-h) + 2.5rem) 0 4rem;
}

.hero__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 4rem;
  }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.hero__badge::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #a855f7;
  box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.6);
  animation: pulse-dot 1.8s ease-out infinite;
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(168, 85, 247, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
  }
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero__role {
  font-size: 1.15rem;
  color: #c4b5fd;
  font-weight: 500;
  margin-bottom: 0.85rem;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.75rem, 7vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.hero__title span {
  color: var(--accent);
}

.hero__lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  max-width: 32rem;
  margin-bottom: 2rem;
  color: var(--muted);
}

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

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
  font-size: 0.875rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.hero__meta a:hover {
  color: var(--text);
}

.hero__meta i {
  color: var(--accent);
  margin-right: 0.4rem;
}

.hero__socials {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}

@media (max-width: 959px) {
  .hero__socials {
    margin-left: 0;
  }
}

.hero__socials a {
  transition: color 0.2s, transform 0.2s;
}

.hero__socials a:hover {
  color: var(--text);
  transform: translateY(-2px);
}

.hero__visual {
  position: relative;
  justify-self: center;
  width: min(100%, 27rem);
  perspective: 1100px;
}

/* Trading-card shell (ref: clipped corner + side rail) */
.hero-card {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 2.15rem;
  aspect-ratio: 3 / 4.15;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.18s ease-out;
  clip-path: polygon(0 2.15rem, 2.15rem 0, 100% 0, 100% 100%, 0 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #08080f;
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.2),
    0 30px 80px -28px rgba(167, 139, 250, 0.35),
    0 18px 50px rgba(0, 0, 0, 0.55);
  isolation: isolate;
  will-change: transform;
  border-radius: 0 0.85rem 0.85rem 0.85rem;
}

.hero-card.is-tilting {
  transition: transform 0.05s linear;
}

.hero-card__art {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(139, 92, 246, 0.12), transparent 40%),
    radial-gradient(circle at 50% 30%, rgba(167, 139, 250, 0.08), transparent 55%),
    #0a0a12;
}

.hero-card__portrait {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  animation: portrait-breathe 5.5s ease-in-out infinite;
}

@keyframes portrait-breathe {
  0%,
  100% {
    transform: scale(1) translateY(0);
  }
  50% {
    transform: scale(1.035) translateY(-1.5%);
  }
}

.hero-card__neon {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  box-shadow:
    inset 0 0 40px rgba(167, 139, 250, 0.18),
    inset 0 0 80px rgba(236, 72, 153, 0.12);
  animation: neon-pulse 3.2s ease-in-out infinite;
}

@keyframes neon-pulse {
  0%,
  100% {
    opacity: 0.55;
    box-shadow:
      inset 0 0 30px rgba(167, 139, 250, 0.14),
      inset 0 0 60px rgba(236, 72, 153, 0.08);
  }
  50% {
    opacity: 1;
    box-shadow:
      inset 0 0 50px rgba(167, 139, 250, 0.28),
      inset 0 0 90px rgba(236, 72, 153, 0.18);
  }
}

.hero-card__rain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.12;
  background-image: repeating-linear-gradient(
    100deg,
    transparent 0,
    transparent 8px,
    rgba(167, 139, 250, 0.28) 9px,
    transparent 10px
  );
  background-size: 20px 140%;
  animation: rain-fall 1.4s linear infinite;
  mix-blend-mode: screen;
}

@keyframes rain-fall {
  from {
    background-position: 0 -40%;
  }
  to {
    background-position: 0 140%;
  }
}

.hero-card.is-tilting .hero-card__portrait {
  animation-play-state: paused;
}

.hero-card__art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(236, 72, 153, 0.12) 48%,
    rgba(167, 139, 250, 0.16) 52%,
    transparent 60%
  );
  mix-blend-mode: color-dodge;
  opacity: 0;
  animation: cyber-glitch 7s steps(2, end) infinite;
}

@keyframes cyber-glitch {
  0%,
  88%,
  100% {
    opacity: 0;
    transform: translate(0);
  }
  90% {
    opacity: 0.7;
    transform: translate(-3px, 1px);
  }
  92% {
    opacity: 0.4;
    transform: translate(3px, -1px);
  }
  94% {
    opacity: 0.8;
    transform: translate(-1px, 2px);
  }
  96% {
    opacity: 0;
    transform: translate(0);
  }
}

.hero-card__rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0.15rem 0.75rem;
  color: #1a1208;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 5;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, transparent 18%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent 40%, rgba(255, 255, 255, 0.12)),
    linear-gradient(180deg, #f6e7a8 0%, #e0b84d 42%, #b8872a 100%);
  box-shadow: inset 0 0 12px rgba(255, 236, 170, 0.45);
}

.hero-card__rail::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 10px,
    rgba(255, 255, 255, 0.06) 10px 11px
  );
  pointer-events: none;
  opacity: 0.5;
}

.hero-card__rail-top {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 1;
}

.hero-card__rank {
  font-size: 0.58rem;
  line-height: 1;
  color: rgba(20, 14, 6, 0.82);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: star-pop 2.8s ease-in-out infinite;
}

.hero-card__rank:nth-child(2) {
  animation-delay: 0.4s;
}

@keyframes star-pop {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

.hero-card__rail-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  z-index: 1;
}

.hero-card__rail-mark {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.35rem;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  color: #f8f0d8;
  background: linear-gradient(145deg, #2a2114, #120e09);
  border: 1px solid rgba(255, 236, 180, 0.45);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.hero-card__rail-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: rgba(18, 12, 4, 0.88);
}

.hero-card__rail-base {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(18, 12, 4, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 236, 180, 0.35);
  z-index: 1;
  animation: rail-dot 2s ease-in-out infinite;
}

@keyframes rail-dot {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
  }
}

/* Holo foil sweep */
.hero-card__shine {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 32%,
    rgba(255, 255, 255, 0.08) 42%,
    rgba(167, 139, 250, 0.22) 48%,
    rgba(251, 191, 36, 0.18) 52%,
    rgba(167, 139, 250, 0.2) 56%,
    transparent 68%
  );
  background-size: 220% 220%;
  mix-blend-mode: screen;
  opacity: 0.55;
  animation: holo-sweep 4.8s ease-in-out infinite;
}

@keyframes holo-sweep {
  0%,
  100% {
    background-position: 120% 40%;
  }
  50% {
    background-position: 0% 60%;
  }
}

/* Mouse-follow glare */
.hero-card__glare {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--mx) var(--my),
    rgba(255, 255, 255, 0.28) 0%,
    rgba(167, 139, 250, 0.08) 22%,
    transparent 46%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  mix-blend-mode: soft-light;
}

.hero-card:hover .hero-card__glare,
.hero-card.is-tilting .hero-card__glare {
  opacity: 1;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
  mix-blend-mode: screen;
  opacity: 0.28;
  pointer-events: none;
}

.hero__fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  filter: saturate(1.12) contrast(1.06) brightness(1.02);
}

/* caption / debug note removidos */

.hero__ring {
  position: absolute;
  inset: -14% -10% auto auto;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(139, 92, 246, 0.45), transparent 70%),
    radial-gradient(circle at 30% 70%, rgba(167, 139, 250, 0.25), transparent 55%);
  filter: blur(10px);
  z-index: -1;
  animation: pulse-soft 5.5s ease-in-out infinite;
}

@keyframes pulse-soft {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.1) rotate(8deg);
  }
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(4.5rem, 8vw, 7.5rem) 0;
  position: relative;
}

.section--alt {
  background:
    linear-gradient(180deg, rgba(139, 92, 246, 0.03), transparent 30%),
    rgba(255, 255, 255, 0.012);
  border-block: 1px solid var(--line);
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.1);
}

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 3.8vw, 2.65rem);
  letter-spacing: -0.035em;
  color: var(--text);
  line-height: 1.12;
  margin-bottom: 1.75rem;
  max-width: 18ch;
}

.section__intro {
  max-width: 36rem;
  margin-bottom: 2.5rem;
}

/* ---------- About ---------- */
.about__grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .about__grid {
    grid-template-columns: 1.2fr 0.9fr 0.95fr;
    gap: 2.75rem;
    align-items: start;
  }
}

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

.about__quote {
  margin-top: 1.75rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  font-style: italic;
  color: #a1a1b2;
  font-size: 0.95rem;
}

.about__photo {
  aspect-ratio: 1;
  position: relative;
}

.about__photo-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #08080f;
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.15),
    0 24px 60px -28px rgba(139, 92, 246, 0.5);
}

.about__photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: saturate(1.1) contrast(1.05);
  animation: portrait-breathe 6s ease-in-out infinite;
  transform-origin: center;
}

.about__photo-neon {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow:
    inset 0 0 40px rgba(167, 139, 250, 0.16),
    inset 0 0 70px rgba(236, 72, 153, 0.1);
  animation: neon-pulse 3.4s ease-in-out infinite;
}

.about__canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.35;
}

.about__photo-corners {
  position: absolute;
  inset: 12px;
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(var(--accent-2), var(--accent-2)) top left / 16px 1.5px no-repeat,
    linear-gradient(var(--accent-2), var(--accent-2)) top left / 1.5px 16px no-repeat,
    linear-gradient(var(--accent-2), var(--accent-2)) top right / 16px 1.5px no-repeat,
    linear-gradient(var(--accent-2), var(--accent-2)) top right / 1.5px 16px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom left / 16px 1.5px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom left / 1.5px 16px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 16px 1.5px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 1.5px 16px no-repeat;
  opacity: 0.75;
}

.about__photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(167, 139, 250, 0.1) 48%,
    rgba(236, 72, 153, 0.1) 52%,
    transparent 65%
  );
  background-size: 220% 220%;
  animation: holo-sweep 5.2s ease-in-out infinite;
  mix-blend-mode: screen;
}

.about__facts {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.85rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 1.25rem;
  background:
    linear-gradient(165deg, rgba(167, 139, 250, 0.05), transparent 40%),
    var(--bg-elevated);
  box-shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.8);
}

.about__fact {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
}

.about__fact i {
  color: var(--accent);
  margin-top: 0.2rem;
}

.about__fact-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.about__fact-value {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}

.about__signoff {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  font-style: italic;
  color: #b4b4c4;
}

.about__signoff cite {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 600;
  color: var(--accent);
  text-align: right;
}

/* ---------- Experience + Projects ---------- */
.split {
  display: grid;
  gap: 3.5rem;
}

@media (min-width: 960px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.focus-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.focus-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.2rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  background:
    linear-gradient(160deg, rgba(139, 92, 246, 0.08), transparent 55%),
    var(--bg-elevated);
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}

.focus-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateX(4px);
  box-shadow: 0 14px 36px -24px rgba(139, 92, 246, 0.5);
}

.focus-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--bg);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
}

.focus-card__icon--fedired {
  color: #38bdf8;
}

.focus-card__icon--dev {
  color: var(--accent-2);
  font-size: 0.95rem;
}

.focus-card__title {
  font-family: var(--font-display);
  font-weight: 650;
  color: var(--text);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.focus-card__desc {
  font-size: 0.88rem;
  line-height: 1.5;
}

.skill-groups {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.skill-group {
  padding: 1rem 1.1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.06);
}

.skill-group__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.55rem;
}

.skill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: 0.55rem;
  background: rgba(24, 16, 40, 0.85);
  color: #e9d5ff;
  transition: border-color 0.2s, transform 0.2s var(--ease), background 0.2s;
}

.skill i,
.skill__svg {
  font-size: 1.15rem;
  line-height: 1;
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.skill__svg {
  display: block;
}

.skill:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.55);
  background: rgba(88, 28, 135, 0.35);
}

.skill--ap .skill__svg {
  width: 1.05rem;
  height: 1.05rem;
}

.badge-soon {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.15rem 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
  color: var(--accent-2);
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
}

.project--soon {
  opacity: 0.88;
  cursor: default;
}

.project--soon:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline__item {
  position: relative;
  padding: 1.35rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  background:
    linear-gradient(160deg, rgba(139, 92, 246, 0.07), transparent 50%),
    var(--bg-elevated);
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}

.timeline__item:hover {
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateX(6px);
  box-shadow: 0 14px 36px -24px rgba(139, 92, 246, 0.5);
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 5px);
  top: 1.6rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.timeline__date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.timeline__role {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.timeline__org {
  font-size: 0.875rem;
  margin-bottom: 0.65rem;
}

.timeline__desc {
  font-size: 0.9rem;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.project {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.1rem;
  align-items: center;
  padding: 1.2rem 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.06), transparent 45%),
    var(--bg-elevated);
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}

.project:hover {
  border-color: rgba(167, 139, 250, 0.35);
  background:
    linear-gradient(135deg, rgba(167, 139, 250, 0.08), transparent 50%),
    var(--surface-hover);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -24px rgba(167, 139, 250, 0.45);
}

.project__icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.85rem;
  border: 1px solid var(--line);
  background: var(--bg);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent);
  transition: transform 0.35s var(--ease);
}

.project:hover .project__icon {
  transform: scale(1.08);
}

.project__icon--fedired {
  color: #38bdf8;
}

.project__icon--orbit {
  color: #f472b6;
}

.project__icon--felvus {
  color: #a78bfa;
}

.project__name {
  font-family: var(--font-display);
  font-weight: 650;
  color: var(--text);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
  transition: color 0.25s;
}

.project:hover .project__name {
  color: var(--accent);
}

.project__desc {
  font-size: 0.85rem;
  margin-bottom: 0.55rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  color: #b0b0be;
  background: rgba(0, 0, 0, 0.25);
}

.tag--tip {
  text-transform: none;
  letter-spacing: 0.02em;
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.1);
}

.hero__lead strong {
  color: var(--text);
  font-weight: 600;
}

.project__arrow {
  color: var(--muted);
  transition: color 0.25s, transform 0.25s;
}

.project:hover .project__arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ---------- Skills grid ---------- */
.skills-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 800px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.tech {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
}

.tech__box {
  width: 100%;
  aspect-ratio: 1;
  max-width: 3.25rem;
  margin-inline: auto;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  color: #8a8a9a;
  transition: border-color 0.25s, color 0.25s, background 0.25s, transform 0.25s var(--ease);
}

.tech:hover .tech__box {
  transform: translateY(-3px);
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.tech span {
  font-size: 0.62rem;
  font-weight: 500;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  font-size: 0.75rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: var(--bg);
  color: #c4c4d0;
}

.edu-list,
.cert-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.edu-item,
.cert-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: start;
}

.edu-item__icon,
.cert-item__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 0.85rem;
}

.edu-item h4,
.cert-item h4 {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.edu-item p,
.cert-item p {
  font-size: 0.78rem;
}

.edu-item__date,
.cert-item__date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.lang-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.lang-row--single {
  grid-template-columns: 1fr;
  max-width: 10rem;
}

.lang {
  padding: 0.7rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--bg-elevated);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 500;
}

.lang--soft {
  border-style: dashed;
  color: var(--muted);
  font-weight: 400;
}

.lang--soft small {
  display: block;
  font-size: 0.65rem;
  margin-bottom: 0.15rem;
}

.note {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(124, 106, 239, 0.25);
  background: var(--accent-soft);
  display: flex;
  gap: 0.75rem;
  align-items: start;
}

.note i {
  color: var(--accent);
  margin-top: 0.15rem;
}

.note strong {
  display: block;
  color: var(--text);
  font-size: 0.875rem;
  margin-bottom: 0.2rem;
}

.note p {
  font-size: 0.8rem;
  color: #b8aef5;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 3.5rem 0 2rem;
}

.contact-grid {
  display: grid;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr 1.05fr;
    gap: 3rem;
    align-items: start;
  }
}

.contact-hint {
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: rgba(196, 181, 253, 0.65);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.35rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(139, 92, 246, 0.28);
  background:
    linear-gradient(160deg, rgba(139, 92, 246, 0.1), transparent 50%),
    var(--bg-elevated);
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}

.contact-form__field span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.contact-form textarea {
  resize: vertical;
  min-height: 7rem;
}

.contact-form__note {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
}

.contact-form__note strong {
  color: #c4b5fd;
  font-weight: 500;
}

body.is-matrix {
  --accent: #c084fc;
}

body.is-matrix .bg-mesh {
  opacity: 0.35;
}

.footer__top {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 800px) {
  .footer__top {
    grid-template-columns: 1.2fr 1fr auto;
    align-items: center;
  }
}

.footer__brand {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.footer__brand h3 {
  font-family: var(--font-display);
  color: var(--text);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.footer__brand p {
  font-size: 0.8rem;
}

.footer__cta-copy .label {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.footer__cta-copy p {
  font-size: 0.85rem;
  max-width: 22rem;
}

.footer__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

@media (min-width: 800px) {
  .footer__actions {
    align-items: flex-end;
  }
}

.footer__bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

.footer__path {
  color: var(--muted);
}

.footer__path i {
  font-size: 0.55rem;
  margin-inline: 0.35rem;
  color: var(--accent);
}

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

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

.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}
.reveal-delay-4 {
  transition-delay: 0.4s;
}

.hero .reveal {
  /* hero uses staged entrance via JS class */
}

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

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

  .reveal,
  .hero .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__ring,
  .btn--primary,
  .hero-card__shine,
  .hero-card__rank,
  .hero-card__rail-base,
  .hero-card__portrait,
  .hero-card__neon,
  .hero-card__rain,
  .hero-card__art::after,
  .about__photo-frame img,
  .about__photo-neon,
  .about__photo-frame::after {
    animation: none;
  }

  .hero-card {
    transform: none !important;
  }

  .scanlines {
    display: none;
  }

  .btn:hover,
  .project:hover,
  .timeline__item:hover {
    transform: none;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: #2a2a36;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
