/* ── Panel stack base ────────────────────────────── */
.panel {
  position: relative;
  width: 100%;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#p-hero     { z-index: 10; background: var(--bg);  }
#p-about    { z-index: 20; background: var(--bg2); }
#p-skills   { z-index: 30; background: var(--bg3); }
#p-projects { z-index: 40; background: #0b0809;   }
#p-services { z-index: 50; background: var(--bg2); }
#p-process  { z-index: 60; background: var(--bg3); }
#p-reviews  { z-index: 65; background: #0e0a0b;   }
#p-contact  { z-index: 70; background: var(--bg);  }

/* ── Hero ────────────────────────────────────────── */
#hero-canvas {
  position: absolute;
  inset: 0; width: 100%; height: 100%;
  z-index: 0;
}
.hero-inner {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: clamp(3rem, 8vw, 6rem);
  position: relative;
  z-index: 2;
}
.hero-eyebrow {
  font-family: var(--ff-mono);
  font-size: .66rem;
  letter-spacing: .3em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .7rem;
}
.hero-eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--ember);
}
.hero-name {
  font-family: var(--ff-display);
  font-size: clamp(5.5rem, 23vw, 15rem);
  line-height: .86;
  letter-spacing: .02em;
  color: var(--text);
  display: inline-block;
  position: relative;
}
.hero-name::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--ember), transparent);
  box-shadow: 0 0 14px var(--glow);
}
.hero-solus {
  font-family: var(--ff-head);
  font-weight: 400;
  font-size: clamp(.85rem, 2.8vw, 1.3rem);
  letter-spacing: .45em;
  text-transform: uppercase;
  margin-top: .7rem;
  background: linear-gradient(90deg, var(--muted) 0%, var(--rose) 45%, var(--muted) 85%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4.5s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

.hero-desc {
  max-width: 400px;
  font-size: .98rem;
  line-height: 1.75;
  color: var(--muted);
  margin-top: 2rem;
  margin-bottom: 2.25rem;
}
.hero-ctas {
  display: flex;
  gap: .85rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.hero-status {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--ff-mono);
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── About ───────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.avatar-wrap {
  position: relative;
  width: min(320px, 82vw);
  aspect-ratio: 2/3;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border);
  animation: floatY 5s ease-in-out infinite;
  margin: 0 auto;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}
.avatar-wrap::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(160deg, var(--ember) 0%, transparent 50%, var(--rose) 100%);
  z-index: -1;
  opacity: .4;
}
.avatar-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.avatar-cycle {
  position: relative;
  width: 100%; height: 100%;
}
.avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.avatar-img:first-child {
  animation: avatarFade1 8s ease-in-out infinite;
}
.avatar-img:last-child {
  animation: avatarFade2 8s ease-in-out infinite;
}
.avatar-glow {
  position: absolute;
  bottom: -28px; left: 50%;
  transform: translateX(-50%);
  width: 80%; height: 56px;
  background: radial-gradient(ellipse, var(--glow) 0%, transparent 70%);
  filter: blur(18px);
  pointer-events: none;
}

.about-bio {
  font-size: 1rem;
  line-height: 1.82;
  color: var(--muted);
  margin-bottom: 2rem;
}
.about-bio strong { color: var(--text); font-weight: 500; }

.stats-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.stat-num {
  display: block;
  font-family: var(--ff-display);
  font-size: 2.6rem;
  color: var(--ember);
  line-height: 1;
}
.stat-num::after { content: '+'; color: var(--rose); font-size: .7em; }
.stat-lbl {
  font-family: var(--ff-mono);
  font-size: .62rem;
  letter-spacing: .12em;
  color: var(--muted);
  text-transform: uppercase;
}
.tag-row { display: flex; flex-wrap: wrap; gap: .45rem; }

/* ── Skills ──────────────────────────────────────── */
.skills-clusters { display: flex; flex-direction: column; gap: 2.25rem; margin-top: 1.5rem; }
.cluster-lbl {
  font-family: var(--ff-mono);
  font-size: .63rem;
  letter-spacing: .2em;
  color: var(--rose);
  text-transform: uppercase;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.cluster-lbl::before { content: ''; width: 18px; height: 1px; background: var(--rose); }
.skills-grid { display: flex; flex-wrap: wrap; gap: .55rem; }

.sk {
  padding: .55rem .95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: .8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .45rem;
  transition: all .3s var(--ease);
  opacity: 0;
  transform: translateY(14px);
}
.sk.vis { opacity: 1; transform: translateY(0); }
.sk:hover {
  border-color: var(--ember);
  color: var(--text);
  box-shadow: 0 0 14px var(--dim);
  transform: translateY(-2px);
}
.sk-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ember); flex-shrink: 0; }
.learning {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .35rem .9rem;
  border: 1px dashed var(--wine);
  border-radius: 999px;
  font-family: var(--ff-mono);
  font-size: .65rem;
  color: var(--muted);
  animation: learnPulse 2.5s ease-in-out infinite;
}
@keyframes learnPulse {
  0%, 100% { border-color: var(--ember); color: var(--rose); }
  50%       { border-color: var(--wine); color: var(--muted); }
}

/* ── Projects ────────────────────────────────────── */
.proj-hint {
  font-family: var(--ff-mono);
  font-size: .65rem;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 1.75rem;
}
.proj-track-wrap {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 1.25rem;
  position: relative;
  cursor: grab;
  user-select: none;
}
.proj-track-wrap.dragging { cursor: grabbing; scroll-behavior: auto; }
.proj-track-wrap::-webkit-scrollbar { display: none; }
.proj-track {
  display: flex;
  gap: 1.1rem;
  width: max-content;
  padding: .5rem 0 .75rem;
  pointer-events: none;
}
.proj-track > * { pointer-events: all; }

/* Project arrows */
.proj-arrow {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  z-index: 5;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .3s var(--ease), background .3s var(--ease);
  pointer-events: none;
}
.proj-track-wrap:hover .proj-arrow,
.proj-arrow:focus-visible {
  opacity: 1;
  pointer-events: all;
}
.proj-arrow:hover { background: var(--ember); border-color: var(--ember); }
.proj-arrow svg { width: 18px; height: 18px; }
.proj-arrow-prev { left: .5rem; }
.proj-arrow-next { right: .5rem; }
.proj-arrow.hidden { opacity: 0 !important; pointer-events: none !important; }

/* Card */
.pcard {
  width: min(270px, 78vw);
  height: 360px;
  flex-shrink: 0;
  perspective: 1000px;
  position: relative;
  cursor: none;
}
.pcard-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .65s var(--ease);
}
.pcard:hover .pcard-inner,
.pcard.flipped .pcard-inner { transform: rotateY(-180deg); }

.pcard-front,
.pcard-back {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  border: 1px solid var(--border);
  backface-visibility: hidden;
  overflow: hidden;
}
.pcard-front { background: var(--surface); }
.pcard-back {
  background: var(--surface2);
  transform: rotateY(180deg);
  border-color: var(--ember);
  box-shadow: 0 0 22px rgba(192,57,43,.12);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.pcard-img {
  width: 100%; height: 195px;
  overflow: hidden;
}
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.pcard:hover .pcard-img img { transform: scale(1.04); }
.pcard-ph {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-display);
  font-size: 1.35rem;
  letter-spacing: .08em;
  background: linear-gradient(135deg,
    hsl(var(--ph,0), 30%, 8%),
    hsl(var(--ph,0), 40%, 13%)
  );
  color: hsl(var(--ph,0), 35%, 60%);
}
.pcard-meta { padding: 1rem 1rem .85rem; }
.pcard-meta h3 {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
  margin-bottom: .4rem;
}
.pcard-tags { display: flex; flex-wrap: wrap; gap: .22rem; }
.pcard-tags span {
  font-family: var(--ff-mono);
  font-size: .6rem;
  color: var(--muted);
  padding: .1rem .4rem;
  border: 1px solid var(--wine);
  border-radius: 2px;
}
.pcard-back h3 {
  font-family: var(--ff-head);
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}
.pcard-back p {
  font-size: .8rem;
  line-height: 1.65;
  color: var(--muted);
  flex: 1;
}
.pcard-stack {
  font-family: var(--ff-mono);
  font-size: .6rem;
  color: var(--ember);
  padding: .35rem .55rem;
  background: var(--dim);
  border-radius: 2px;
}
.pcard-back .btn { margin-top: auto; align-self: flex-start; }

/* Terminal card — for non-web projects */
.pcard-terminal .pcard-front {
  background: #0a0808;
  border-color: var(--wine);
  display: flex;
  flex-direction: column;
}
.terminal-bar {
  padding: .65rem 1rem;
  background: var(--wine2);
  display: flex;
  align-items: center;
  gap: .4rem;
  border-bottom: 1px solid var(--wine);
  flex-shrink: 0;
}
.terminal-bar span {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.tb-r { background: #ff5f57; }
.tb-y { background: #febc2e; }
.tb-g { background: #28c840; }
.terminal-bar .tb-label {
  margin-left: auto;
  font-family: var(--ff-mono);
  font-size: .58rem;
  color: var(--faint);
  letter-spacing: .12em;
  width: auto; height: auto;
  border-radius: 0;
  background: none;
}
.terminal-body {
  flex: 1;
  padding: 1rem;
  font-family: var(--ff-mono);
  font-size: .72rem;
  line-height: 1.9;
  color: var(--muted);
  overflow: hidden;
}
.t-line { display: flex; gap: .5rem; }
.t-prompt { color: var(--ember); flex-shrink: 0; }
.t-cmd    { color: var(--rose); }
.t-out    { color: var(--muted); padding-left: 1.1rem; }
.t-status-running {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: #4CAF50;
  font-size: .65rem;
}
.t-blink {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4CAF50;
  box-shadow: 0 0 8px #4CAF50;
  animation: statusPulse 1.5s infinite;
}

/* ── Services ────────────────────────────────────── */
.serv-sub { color: var(--muted); font-size: .95rem; margin-bottom: 2.25rem; max-width: 460px; }
.serv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: .9rem;
  margin-bottom: 1.75rem;
}
.scard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1.4rem;
  transition: all .35s var(--ease);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(22px);
}
.scard.vis { opacity: 1; transform: translateY(0); }
.scard::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ember), transparent);
  opacity: 0;
  transition: opacity .3s;
}
.scard:hover {
  border-color: var(--ember);
  transform: translateY(-5px);
  box-shadow: 0 18px 48px rgba(0,0,0,.45), 0 0 22px var(--dim);
}
.scard:hover::before { opacity: 1; }
.scard-feat {
  border-color: var(--wine);
  background: linear-gradient(135deg, var(--surface) 55%, rgba(192,57,43,.07));
}
.scard-badge {
  position: absolute;
  top: .85rem; right: .85rem;
  background: var(--ember);
  color: var(--text);
  font-size: .55rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .14rem .5rem;
  border-radius: 999px;
}
.scard-icon {
  font-family: var(--ff-mono);
  font-size: .72rem;
  color: var(--ember);
  letter-spacing: .04em;
  margin-bottom: .8rem;
}
.scard h3 {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: .92rem;
  color: var(--text);
  margin-bottom: .35rem;
}
.scard p { font-size: .8rem; line-height: 1.65; color: var(--muted); margin-bottom: 1.1rem; }
.price-val {
  display: block;
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: .98rem;
  color: var(--ember);
}
.scard-feat .price-val { color: var(--rose); }
.price-note {
  font-family: var(--ff-mono);
  font-size: .58rem;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.payment-terms {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  flex-wrap: wrap;
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
}
.pt { font-family: var(--ff-mono); font-size: .7rem; color: var(--rose); letter-spacing: .08em; }
.pt-sep { color: var(--faint); }

/* ── Process ─────────────────────────────────────── */
.proc-steps {
  display: flex;
  flex-direction: column;
  margin-top: 2.25rem;
  position: relative;
}
.proc-steps::before {
  content: '';
  position: absolute;
  left: 1.4rem; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--ember) 0%, transparent 100%);
  opacity: .25;
}
.proc-step {
  display: grid;
  grid-template-columns: 2.8rem 1fr;
  gap: 1.4rem;
  align-items: start;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.proc-step:last-child { border-bottom: none; }
.proc-step.vis { opacity: 1; transform: translateX(0); }
.proc-num {
  font-family: var(--ff-display);
  font-size: 1.7rem;
  color: var(--ember);
  line-height: 1;
  text-align: center;
  text-shadow: 0 0 18px var(--glow);
}
.proc-step h3 { font-family: var(--ff-head); font-weight: 700; font-size: .95rem; color: var(--text); margin-bottom: .35rem; }
.proc-step p { font-size: .88rem; color: var(--muted); line-height: 1.72; }

/* ── Contact ─────────────────────────────────────── */
#p-contact { min-height: 100svh; }
#contact-canvas {
  position: absolute;
  inset: 0; width: 100%; height: 100%;
  z-index: 0;
}
.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  text-align: center;
  gap: 1.4rem;
  position: relative;
  z-index: 2;
}
.contact-avail {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--ff-mono);
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #4CAF50;
}
.avail-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4CAF50;
  box-shadow: 0 0 8px #4CAF50;
  animation: statusPulse 2s infinite;
}
.contact-title {
  font-family: var(--ff-display);
  font-size: clamp(3.5rem, 14vw, 9rem);
  letter-spacing: .04em;
  color: var(--text);
  line-height: .9;
}
.contact-title em {
  display: block;
  -webkit-text-stroke: 1px var(--ember);
  color: transparent;
  font-style: normal;
  font-size: .65em;
}
.contact-sub { font-size: .95rem; color: var(--muted); max-width: 360px; line-height: 1.75; }
.contact-ctas { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; margin-top: .35rem; }
.socials { display: flex; gap: .7rem; }
.social {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all .3s var(--ease);
  cursor: none;
}
.social:hover {
  border-color: var(--ember);
  color: var(--ember);
  box-shadow: 0 0 12px var(--glow);
  transform: translateY(-3px);
}
.social svg { width: 15px; height: 15px; }

/* Footer strip */
.contact-footer {
  position: absolute;
  bottom: 1.75rem;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  font-family: var(--ff-mono);
  font-size: .6rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--faint);
  flex-wrap: wrap;
  padding: 0 1.5rem;
}
.cf-sep { color: var(--ember); }
.cf-link {
  color: var(--muted);
  transition: color .3s;
  cursor: none;
}
.cf-link:hover { color: var(--ember); }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.25rem; padding-top: 7rem; }
  .avatar-wrap { width: min(260px, 65vw); }
}
@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; }
  .contact-ctas { flex-direction: column; align-items: center; }
  .payment-terms { flex-direction: column; gap: .45rem; }
  .serv-grid { grid-template-columns: 1fr; }
}
