/* ===========================================================
   IamPalski — custom styles layered over Tailwind
   =========================================================== */

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

/* Hide scrollbar on the testimonial track */
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ---------- Nav ---------- */
[data-nav].is-scrolled nav { box-shadow: 0 10px 40px -18px rgba(20,19,15,0.35); }

.nav-link {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 9999px;
  color: #4d4a44;
  transition: background-color .2s ease, color .2s ease;
}
.nav-link:hover { background: #E9E4D8; color: #14130F; }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: #14130F; color: #F3F0E9;
  padding: .8rem 1.5rem; border-radius: 9999px;
  font-size: .9rem; font-weight: 500; line-height: 1; white-space: nowrap;
  transition: background-color .2s ease, transform .2s ease;
}
.btn-primary svg { flex: none; display: block; }
.btn-primary:hover { background: #C2562B; transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.5rem; border-radius: 9999px;
  border: 1px solid rgba(20,19,15,.2);
  font-size: .9rem; font-weight: 500; line-height: 1; white-space: nowrap; color: #14130F;
  transition: background-color .2s ease, border-color .2s ease;
}
.btn-ghost:hover { background: #14130F; color: #F3F0E9; border-color: #14130F; }

/* ---------- Eyebrows ---------- */
.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: #6E6A61;
}
.eyebrow-dark {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: #928D81;
}

/* ---------- Status dot ---------- */
.status-dot {
  position: relative; display: inline-block; width: 8px; height: 8px;
  border-radius: 9999px; background: #C2562B;
}
.status-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 9999px;
  border: 1px solid #C2562B; opacity: .5;
  animation: dot-pulse 2.4s ease-out 3;
}
@keyframes dot-pulse {
  0% { transform: scale(.6); opacity: .6; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ---------- Hero inline avatar pill ---------- */
.hero-pill {
  display: inline-grid; place-items: center;
  width: clamp(56px, 9vw, 92px); height: clamp(40px, 6vw, 60px);
  border-radius: 9999px; overflow: hidden;
  background: #E9E4D8; border: 1px solid rgba(20,19,15,.08);
  box-shadow: inset 0 0 0 4px #F3F0E9;
}
.hero-pill img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  filter: grayscale(1) contrast(1.05);
}
.hp-fallback {
  display: grid; place-items: center; width: 100%; height: 100%;
  font-family: "Inter Tight", sans-serif; font-weight: 800;
  font-size: 1rem; color: #6E6A61; background: #DED7C7;
}

/* ---------- About portrait ---------- */
.portrait-frame {
  position: relative;
  width: clamp(230px, 34vw, 320px);
  aspect-ratio: 4 / 5;
  background: #F3F0E9;
  padding: 12px;
  border-radius: 6px;
  transform: rotate(3deg);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.portrait-frame:hover { transform: rotate(0deg); }
.portrait-img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  border-radius: 3px;
  filter: grayscale(1) contrast(1.06);
  transition: filter .4s ease;
}
.portrait-frame:hover .portrait-img { filter: grayscale(0) contrast(1); }
.portrait-fallback {
  display: none;
  position: absolute; inset: 12px;
  border-radius: 3px;
  place-items: center; text-align: center;
  background: repeating-linear-gradient(45deg,#E9E4D8,#E9E4D8 10px,#E3DCCD 10px,#E3DCCD 20px);
  color: #6E6A61; font-size: 12px; line-height: 1.6;
  font-family: "JetBrains Mono", monospace;
}
.portrait-frame.is-empty .portrait-fallback { display: grid; }

/* ---------- Service cards ---------- */
.service-card {
  background: #fff; border: 1px solid rgba(20,19,15,.07);
  border-radius: 1.5rem; padding: 1.25rem 1.25rem 1.6rem;
  transition: transform .3s ease, box-shadow .3s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -28px rgba(20,19,15,.4); }

.service-thumb, .content-thumb {
  position: relative; height: 200px; border-radius: 1rem; overflow: hidden;
  display: grid; place-items: end start;
  filter: grayscale(1); transition: filter .4s ease;
}
.service-card:hover .service-thumb,
.content-card:hover .content-thumb { filter: grayscale(0); }

.content-thumb { height: 170px; }

.thumb-tag {
  margin: .8rem; font-size: 10px; letter-spacing: .15em; text-transform: uppercase;
  background: rgba(243,240,233,.9); color: #14130F;
  padding: .3rem .6rem; border-radius: 9999px;
}

/* platform thumbnail images */
.thumb-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}

/* generated monochrome thumbnails — intentional placeholders */
.thumb-a { background:
  radial-gradient(120% 100% at 0% 0%, #2a2722 0%, transparent 55%),
  radial-gradient(120% 120% at 100% 100%, #C2562B 0%, transparent 60%),
  linear-gradient(135deg,#3a352d,#14130F); }
.thumb-b { background:
  radial-gradient(90% 90% at 80% 10%, #4a443a 0%, transparent 60%),
  conic-gradient(from 210deg at 30% 70%, #14130F, #5a5347, #14130F); }
.thumb-c { background:
  radial-gradient(100% 100% at 20% 20%, #C2562B 0%, transparent 45%),
  linear-gradient(160deg,#2a2722,#14130F 70%); }

/* ---------- Ebook tiles ---------- */
.ebook-grid {
  display: grid; gap: 1.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 680px)  { .ebook-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .ebook-grid { grid-template-columns: repeat(3, 1fr); } }

.ebook-tile {
  display: flex; flex-direction: column;
  background: #FFFDFA;
  border: 1px solid rgba(20,19,15,.09);
  border-radius: 1.35rem;
  overflow: hidden;
  transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s ease, border-color .3s ease;
}
.ebook-tile:hover {
  transform: translateY(-6px);
  border-color: rgba(194,86,43,.3);
  box-shadow: 0 28px 55px -30px rgba(20,19,15,.5);
}

/* cover */
.tile-media {
  position: relative; display: block;
  aspect-ratio: 16 / 9; overflow: hidden;
  background: #E9E4D8;
  border-bottom: 1px solid rgba(20,19,15,.07);
}
.tile-media img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.ebook-tile:hover .tile-media img { transform: scale(1.05); }

.tile-badge {
  position: absolute; top: .8rem; right: .8rem;
  background: rgba(20,19,15,.88); color: #F3F0E9;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  padding: .34rem .7rem; border-radius: 9999px;
  backdrop-filter: blur(4px);
  transition: background-color .3s ease;
}
.ebook-tile:hover .tile-badge { background: #C2562B; }

/* body */
.tile-body {
  display: flex; flex-direction: column; flex: 1;
  padding: 1.5rem 1.5rem 1.6rem;
}
.tile-kicker {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: #C2562B; margin-bottom: .6rem;
}
.tile-title {
  font-weight: 800; letter-spacing: -.022em; font-size: 1.18rem; line-height: 1.2;
  color: #14130F; margin-bottom: .6rem;
}
.tile-desc {
  font-size: .92rem; line-height: 1.6; color: #6E6A61;
  flex: 1; margin-bottom: 1.4rem;
}
.tile-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-top: 1.1rem; border-top: 1px solid rgba(20,19,15,.08);
}
.tile-meta {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #928D81;
}
.tile-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: #14130F; color: #F3F0E9;
  font-size: .85rem; font-weight: 500; line-height: 1; white-space: nowrap;
  padding: .72rem 1.3rem; border-radius: 9999px;
  transition: background-color .25s ease, transform .25s ease;
}
.tile-btn svg { flex: none; transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.tile-btn:hover { background: #C2562B; transform: translateY(-1px); }
.tile-btn:hover svg { transform: translate(2px,-2px); }
.ebook-tile:hover .tile-btn { background: #C2562B; }

/* ---------- Ebook ---------- */
.ebook-card {
  display: flex; flex-direction: column;
  padding: 2rem; border-radius: 1.5rem;
  border: 1px solid rgba(20,19,15,.08);
  background: #FAF8F3;
}

.ebook-cover {
  display: block; border-radius: .85rem; overflow: hidden;
  border: 1px solid rgba(20,19,15,.1);
  box-shadow: 0 20px 50px -28px rgba(20,19,15,.5);
  transform: rotate(-1deg);
  transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s ease;
}
.ebook-cover:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 0 30px 60px -28px rgba(20,19,15,.55); }
.ebook-cover img { display: block; width: 100%; height: auto; }

.ebook-cover-placeholder { transform: rotate(0deg); }
.ebook-placeholder-inner {
  display: flex; align-items: center; justify-content: center;
  min-height: 280px; background: #E9E4D8;
  color: #14130F;
}

.ebook-point {
  display: flex; gap: .9rem; align-items: flex-start;
  font-size: .95rem; line-height: 1.55; color: #4d4a44;
}
.ebook-point strong { color: #14130F; font-weight: 600; }
.ebook-bullet {
  flex: none; margin-top: .15rem;
  font-size: 11px; letter-spacing: .05em; color: #C2562B;
}

/* ---------- Project accordion ---------- */
.project-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.5rem 0; text-align: left; cursor: pointer;
  color: #F3F0E9;
}
.project-head:hover .project-meta { color: #C2562B; }
.project-meta {
  display: inline-flex; align-items: center; gap: 1rem;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #928D81;
  transition: color .25s ease;
}
.plus { position: relative; width: 18px; height: 18px; flex: none; }
.plus::before, .plus::after {
  content: ""; position: absolute; background: currentColor; border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.plus::before { left: 0; top: 8px; width: 18px; height: 2px; }
.plus::after  { left: 8px; top: 0; width: 2px; height: 18px; }
.project.open .plus::after { transform: scaleY(0); opacity: 0; }
.project.open .project-head { color: #fff; }

.project-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.project.open .project-body { grid-template-rows: 1fr; }
.project-body-inner {
  overflow: hidden;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.project.open .project-body-inner { padding-bottom: 1.75rem; }

.project-link {
  display: inline-flex; align-items: center; gap: .5rem; flex: none;
  font-size: .85rem; font-weight: 500; color: #F3F0E9;
  border: 1px solid rgba(243,240,233,.25); border-radius: 9999px; padding: .6rem 1.1rem;
  transition: background-color .2s ease, color .2s ease;
}
.project-link:hover { background: #C2562B; border-color: #C2562B; color: #fff; }

.project-legal {
  display: inline-flex; align-items: center; gap: .75rem;
  font-size: 11px; letter-spacing: .1em; color: #928D81;
}
.project-legal a {
  color: #928D81; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: rgba(146,141,129,.4);
  transition: color .2s ease, text-decoration-color .2s ease;
}
.project-legal a:hover { color: #C2562B; text-decoration-color: #C2562B; }
.project-legal span { color: rgba(243,240,233,.3); }

.project-flag {
  display: inline-flex; align-items: center;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: #C2562B; background: rgba(194,86,43,.14);
  border: 1px solid rgba(194,86,43,.35);
  padding: .28rem .6rem; border-radius: 9999px;
}

/* ---------- Projects showcase (tabbed) ---------- */
.pw-top {
  display: flex; flex-direction: column; gap: 1.25rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
  .pw-top { flex-direction: row; align-items: flex-end; justify-content: space-between; margin-bottom: 3rem; }
  .pw-intro { text-align: right; }
}

.pw-stage {
  position: relative; overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid rgba(243,240,233,.12);
  background: #100F0C;
  min-height: 420px;
  padding: clamp(1.75rem, 4vw, 3rem);
}
.pw-texture {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(243,240,233,.10) 1.5px, transparent 2px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(120% 100% at 85% 15%, #000 20%, transparent 68%);
  mask-image: radial-gradient(120% 100% at 85% 15%, #000 20%, transparent 68%);
}
.pw-glow {
  position: absolute; right: -140px; top: -140px; width: 460px; height: 460px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(194,86,43,.28), transparent 68%);
  filter: blur(28px);
}
.pw-nav {
  position: absolute; top: clamp(1.5rem,4vw,2.4rem); right: clamp(1.5rem,4vw,2.4rem);
  display: flex; gap: .6rem; z-index: 3;
}
.pw-arrow {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9999px;
  border: 1px solid rgba(243,240,233,.2); color: #F3F0E9; background: rgba(243,240,233,.04);
  transition: background-color .2s ease, color .2s ease, transform .2s cubic-bezier(.34,1.56,.64,1);
}
.pw-arrow:hover { background: #C2562B; border-color: #C2562B; transform: scale(1.08); }
.pw-arrow:active { transform: scale(.94); }

/* stacked panels — only the active one is visible */
.pw-panels { position: relative; display: grid; }
.pw-panel {
  grid-area: 1 / 1;
  display: grid; grid-template-columns: 1fr; gap: 2rem;
  align-items: center;
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .45s ease, transform .45s cubic-bezier(.2,.7,.2,1), visibility .45s;
  pointer-events: none;
}
.pw-panel.is-active { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
@media (min-width: 860px) {
  .pw-panel { grid-template-columns: 1.1fr .9fr; gap: 3rem; }
}

.pw-info { max-width: 34rem; }
.pw-tag {
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #928D81;
}
.pw-titlerow { display: flex; align-items: center; gap: .9rem; margin: 1rem 0 1.1rem; flex-wrap: wrap; }
.pw-title {
  font-weight: 800; letter-spacing: -.03em; line-height: 1;
  font-size: clamp(2.4rem, 6vw, 4rem); color: #F3F0E9;
}
.pw-flag {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: #C2562B; background: rgba(194,86,43,.14); border: 1px solid rgba(194,86,43,.4);
  padding: .3rem .65rem; border-radius: 9999px;
}
.pw-desc { color: #B7AE9F; line-height: 1.65; font-size: 15px; }
.pw-actions { margin-top: 1.75rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.5rem; }
.pw-cta {
  display: inline-flex; align-items: center; gap: .55rem;
  background: #F3F0E9; color: #14130F;
  font-size: .85rem; font-weight: 600; line-height: 1;
  padding: .8rem 1.4rem; border-radius: 9999px;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.pw-cta svg { transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.pw-cta:hover { background: #C2562B; color: #F3F0E9; transform: translateY(-1px); }
.pw-cta:hover svg { transform: translate(2px,-2px); }
.pw-legal { font-size: 11px; letter-spacing: .1em; color: #928D81; }
.pw-legal a { color: #928D81; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(146,141,129,.4); transition: color .2s ease; }
.pw-legal a:hover { color: #C2562B; }

/* right visual card */
.pw-visual {
  position: relative; overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid rgba(243,240,233,.1);
  background: linear-gradient(150deg, #16130F, #0c0b09);
  min-height: 240px;
  padding: 1.75rem;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.pw-visual::before {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(194,86,43,.4), transparent 66%);
  filter: blur(20px);
}
.pw-idx { position: absolute; top: 1.4rem; left: 1.6rem; font-size: 11px; letter-spacing: .2em; color: #928D81; }
.pw-big {
  position: relative; z-index: 1;
  font-weight: 900; letter-spacing: -.04em; line-height: .92;
  font-size: clamp(2rem, 4.4vw, 3rem);
  background: linear-gradient(100deg, #F3F0E9 40%, #C2562B);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.pw-vtype { position: relative; z-index: 1; margin-top: .6rem; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #928D81; }

/* tab bar */
.pw-tabs {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-top: 1.5rem;
}
.pw-tab {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px; letter-spacing: .08em;
  color: #928D81; background: rgba(243,240,233,.04);
  border: 1px solid rgba(243,240,233,.1);
  padding: .7rem 1.1rem; border-radius: 9999px;
  transition: color .25s ease, background-color .25s ease, border-color .25s ease;
}
.pw-tab .pw-tdot {
  width: 7px; height: 7px; border-radius: 9999px; background: currentColor; opacity: .5;
  transition: background-color .25s ease, opacity .25s ease;
}
.pw-tab:hover { color: #F3F0E9; border-color: rgba(243,240,233,.24); }
.pw-tab.is-active {
  color: #F3F0E9; background: rgba(194,86,43,.16); border-color: rgba(194,86,43,.5);
}
.pw-tab.is-active .pw-tdot { background: #C2562B; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .pw-panel { transition: opacity .01ms, visibility .01ms; transform: none; }
}

/* ---------- Testimonials ---------- */
.testimonial {
  flex: 0 0 100%; max-width: 100%;
  background: #fff; border: 1px solid rgba(20,19,15,.07);
  border-radius: 1.75rem; padding: 2rem;
}
@media (min-width: 768px) { .testimonial { flex-basis: 560px; max-width: 560px; } }
.stars { color: #C2562B; letter-spacing: .15em; font-size: .9rem; }
.avatar {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 9999px; background: #14130F; color: #F3F0E9;
  font-family: "Inter Tight", sans-serif; font-weight: 700; font-size: .8rem;
}
.arrow {
  display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 9999px; border: 1px solid rgba(20,19,15,.2); color: #14130F;
  transition: background-color .2s ease, color .2s ease;
}
.arrow:hover { background: #14130F; color: #F3F0E9; }

/* ---------- Hire Me cards ---------- */
.hire-card {
  background: #100F0C;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 1.25rem;
  padding: 2rem;
  display: flex; flex-direction: column; gap: .75rem;
  transition: background-color .3s ease, border-color .3s ease;
}
.hire-card:hover { background: #1B1916; border-color: rgba(194,86,43,.3); }
.hire-icon {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: .85rem;
  background: rgba(194,86,43,.12); color: #C2562B; margin-bottom: .5rem;
}
.hire-title { font-size: 1.15rem; letter-spacing: -.01em; color: #F3F0E9; margin-bottom: .25rem; }
.hire-desc { font-size: .9rem; line-height: 1.65; color: #928D81; flex: 1; }
.hire-list {
  list-style: none; margin-top: .75rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.hire-list li {
  font-size: .82rem; font-family: "JetBrains Mono", monospace;
  letter-spacing: .03em; color: #C2562B;
  padding-left: 1rem; position: relative;
}
.hire-list li::before { content: '→'; position: absolute; left: 0; }
.hire-btn {
  display: inline-flex; align-items: center; gap: .55rem;
  background: #F3F0E9; color: #14130F;
  padding: .85rem 1.75rem; border-radius: 9999px;
  font-size: .9rem; font-weight: 600; white-space: nowrap;
  transition: background-color .2s ease, transform .2s ease;
}
.hire-btn:hover { background: #C2562B; color: #F3F0E9; transform: translateY(-1px); }

/* ---------- Capability tiles ---------- */
.cap-tile {
  position: relative;
  background: #100F0C;
  padding: 1.6rem 1.5rem 1.8rem;
  transition: background-color .3s ease;
}
.cap-tile:hover { background: #1B1916; }
.cap-idx {
  display: inline-block; font-size: 11px; letter-spacing: .05em; color: #C2562B; margin-bottom: 1.4rem;
}
.cap-title {
  font-size: 1.1rem; letter-spacing: -.01em; color: #F3F0E9;
  display: flex; align-items: center; gap: .5rem;
}
.cap-title::after {
  content: ""; width: 14px; height: 14px; flex: none;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 9.5L9.5 2.5M9.5 2.5H4M9.5 2.5V8' stroke='%23C2562B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  opacity: 0; transform: translate(-4px,4px); transition: opacity .3s ease, transform .3s ease;
}
.cap-tile:hover .cap-title::after { opacity: 1; transform: none; }
.cap-desc { margin-top: .55rem; font-size: .9rem; line-height: 1.6; color: #928D81; }

/* ---------- Content cards ---------- */
.content-card {
  display: block; background: #fff; border: 1px solid rgba(20,19,15,.07);
  border-radius: 1.5rem; padding: 1.1rem 1.1rem 1.4rem;
  transition: transform .3s ease, box-shadow .3s ease;
}
.content-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -28px rgba(20,19,15,.4); }
.content-cta { display: inline-block; margin-top: 1rem; font-size: .85rem; font-weight: 600; color: #14130F; }
.content-card:hover .content-cta { color: #C2562B; }

/* ---------- Footer social ---------- */
.social {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 9999px; border: 1px solid rgba(20,19,15,.15); color: #14130F;
  transition: background-color .2s ease, color .2s ease;
}
.social:hover { background: #14130F; color: #F3F0E9; }

/* ---------- Scroll reveal (only when JS is active) ---------- */
.js .reveal {
  opacity: 0; transform: translateY(26px);
  filter: blur(6px);
  transition: opacity .8s cubic-bezier(.2,.65,.3,1), transform .8s cubic-bezier(.2,.65,.3,1), filter .8s ease;
}
.js .reveal.in { opacity: 1; transform: none; filter: blur(0); }

/* reveal variants (added by JS) */
.js .reveal-left  { opacity: 0; transform: translateX(-34px); filter: blur(6px);
  transition: opacity .8s cubic-bezier(.2,.65,.3,1), transform .8s cubic-bezier(.2,.65,.3,1), filter .8s ease; }
.js .reveal-right { opacity: 0; transform: translateX(34px);  filter: blur(6px);
  transition: opacity .8s cubic-bezier(.2,.65,.3,1), transform .8s cubic-bezier(.2,.65,.3,1), filter .8s ease; }
.js .reveal-scale { opacity: 0; transform: scale(.92) translateY(14px); filter: blur(6px);
  transition: opacity .8s cubic-bezier(.2,.65,.3,1), transform .8s cubic-bezier(.2,.65,.3,1), filter .8s ease; }
.js .reveal-left.in, .js .reveal-right.in, .js .reveal-scale.in { opacity: 1; transform: none; filter: blur(0); }

/* ===========================================================
   ANIMATION LAYER — ambience, motion, micro-interactions
   =========================================================== */

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, #C2562B, #E07B4C);
  transform-origin: 0 50%; transform: scaleX(0);
  z-index: 100; pointer-events: none;
}

/* ---------- Ambient background orbs ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }

/* scroll-parallax background pattern: fine dot grid + faint contour rings */
.bg-pattern, .bg-pattern-rings {
  position: absolute; left: 0; right: 0; top: -20vh; height: 140vh;
  will-change: transform;
}
.bg-pattern {
  background-image: radial-gradient(rgba(20,19,15,.10) 1px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(120% 90% at 50% 40%, #000 30%, transparent 75%);
}
.bg-pattern-rings {
  background-image:
    radial-gradient(circle at 12% 25%, transparent 118px, rgba(20,19,15,.045) 119px, rgba(20,19,15,.045) 120px, transparent 121px),
    radial-gradient(circle at 12% 25%, transparent 158px, rgba(20,19,15,.04) 159px, rgba(20,19,15,.04) 160px, transparent 161px),
    radial-gradient(circle at 12% 25%, transparent 198px, rgba(20,19,15,.035) 199px, rgba(20,19,15,.035) 200px, transparent 201px),
    radial-gradient(circle at 88% 70%, transparent 138px, rgba(194,86,43,.06) 139px, rgba(194,86,43,.06) 140px, transparent 141px),
    radial-gradient(circle at 88% 70%, transparent 178px, rgba(194,86,43,.05) 179px, rgba(194,86,43,.05) 180px, transparent 181px),
    radial-gradient(circle at 88% 70%, transparent 218px, rgba(194,86,43,.04) 219px, rgba(194,86,43,.04) 220px, transparent 221px);
}
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: .5;
  will-change: transform;
}
.orb-a {
  width: 44vw; height: 44vw; top: -14vw; right: -10vw;
  background: radial-gradient(circle at 35% 35%, rgba(194,86,43,.16), transparent 65%);
  animation: orb-drift-a 26s ease-in-out infinite alternate;
}
.orb-b {
  width: 36vw; height: 36vw; bottom: -12vw; left: -12vw;
  background: radial-gradient(circle at 60% 40%, rgba(222,196,138,.28), transparent 65%);
  animation: orb-drift-b 32s ease-in-out infinite alternate;
}
.orb-c {
  width: 24vw; height: 24vw; top: 40%; left: 55%;
  background: radial-gradient(circle at 50% 50%, rgba(194,86,43,.09), transparent 65%);
  animation: orb-drift-c 40s ease-in-out infinite alternate;
}
@keyframes orb-drift-a { from { transform: translate(0,0) scale(1); }    to { transform: translate(-7vw,9vh)  scale(1.15); } }
@keyframes orb-drift-b { from { transform: translate(0,0) scale(1.1); }  to { transform: translate(8vw,-7vh)  scale(.95); } }
@keyframes orb-drift-c { from { transform: translate(0,0); }             to { transform: translate(-10vw,-12vh); } }

/* ---------- Nav polish ---------- */
[data-nav] nav { transition: box-shadow .3s ease, transform .35s cubic-bezier(.2,.7,.2,1); }
[data-nav].nav-hidden nav { transform: translateY(-140%); }
.nav-link { position: relative; }
.nav-link::after {
  content: ""; position: absolute; left: 50%; bottom: 4px;
  width: 0; height: 2px; border-radius: 2px; background: #C2562B;
  transform: translateX(-50%); transition: width .28s cubic-bezier(.2,.7,.2,1);
}
.nav-link:hover::after { width: calc(100% - 1.7rem); }

/* logo wiggle */
[data-nav] a[aria-label="IamPalski home"] img { transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
[data-nav] a[aria-label="IamPalski home"]:hover img { transform: rotate(-3deg) scale(1.06); }

/* ---------- Buttons: sheen sweep + magnetic base ---------- */
.btn-primary, .hire-btn, .btn-ghost { position: relative; overflow: hidden; will-change: transform; }
.btn-primary::before, .hire-btn::before {
  content: ""; position: absolute; top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.25), transparent);
  transform: skewX(-20deg); transition: left .55s ease;
  pointer-events: none;
}
.btn-primary:hover::before, .hire-btn:hover::before { left: 140%; }
.btn-primary svg, .btn-ghost svg, .hire-btn svg, .project-link svg { transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.btn-primary:hover svg, .btn-ghost:hover svg, .hire-btn:hover svg, .project-link:hover svg { transform: translate(2px,-2px); }

/* ---------- Status dot: pulse forever ---------- */
.status-dot::after { animation: dot-pulse 2.4s ease-out infinite; }

/* ---------- Hero pill: gentle bob ---------- */
.hero-pill { animation: pill-bob 5s ease-in-out infinite; }
@keyframes pill-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-4px) rotate(2deg); }
}

/* ---------- Ember words: living gradient ---------- */
.text-ember {
  background: linear-gradient(100deg, #C2562B 20%, #E07B4C 40%, #C2562B 60%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: ember-flow 5s ease-in-out infinite;
}
@keyframes ember-flow { 0%,100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }

/* ---------- Portrait: parallax handled by JS, add depth on hover ---------- */
.portrait-frame { will-change: transform; }

/* ---------- Ebook covers: idle float + sheen ---------- */
.ebook-cover { position: relative; }
.ebook-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.28) 50%, transparent 60%);
  background-size: 250% 100%; background-position: 130% 0;
  transition: background-position .8s ease;
  pointer-events: none;
}
.ebook-cover:hover::after { background-position: -30% 0; }
.ebook-cover img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.ebook-cover:hover img { transform: scale(1.03); }

/* ebook card lift */
.ebook-card { transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s ease, border-color .3s ease; }
.ebook-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px -34px rgba(20,19,15,.45);
  border-color: rgba(194,86,43,.25);
}
.ebook-bullet { transition: transform .25s cubic-bezier(.34,1.56,.64,1); display: inline-block; }
.ebook-point:hover .ebook-bullet { transform: scale(1.35); }

/* ---------- Projects: row slide + accent bar ---------- */
.project { position: relative; transition: padding-left .35s cubic-bezier(.2,.7,.2,1); }
.project::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 3px; height: 0; border-radius: 3px; background: #C2562B;
  transform: translateY(-50%); transition: height .35s cubic-bezier(.2,.7,.2,1);
}
.project:hover, .project.open { padding-left: 1.1rem; }
.project:hover::before, .project.open::before { height: 55%; }
.project-head .font-display { transition: color .25s ease, letter-spacing .35s cubic-bezier(.2,.7,.2,1); }
.project:hover .project-head .font-display { color: #fff; letter-spacing: .01em; }
.plus { transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.project-head:hover .plus { transform: rotate(90deg); }
.project.open .plus { transform: rotate(180deg); }

/* ---------- Testimonials: card life + star shimmer ---------- */
.testimonial { transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s ease; }
.testimonial:hover { transform: translateY(-4px) rotate(-.3deg); box-shadow: 0 26px 50px -30px rgba(20,19,15,.35); }
.testimonial .avatar { transition: transform .3s cubic-bezier(.34,1.56,.64,1), background-color .3s ease; }
.testimonial:hover .avatar { transform: scale(1.12) rotate(-6deg); background: #C2562B; }
.stars { display: inline-block; }
.testimonial:hover .stars { animation: stars-pop .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes stars-pop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
.arrow { transition: background-color .2s ease, color .2s ease, transform .2s cubic-bezier(.34,1.56,.64,1); }
.arrow:hover { transform: scale(1.1); }
.arrow:active { transform: scale(.92); }

/* ---------- Hire cards: tilt (JS) + icon life + list cascade ---------- */
.hire-card { will-change: transform; transform-style: preserve-3d; }
.hire-card:hover { box-shadow: 0 24px 60px -30px rgba(0,0,0,.8); }
.hire-icon { transition: transform .35s cubic-bezier(.34,1.56,.64,1), background-color .3s ease, color .3s ease; }
.hire-card:hover .hire-icon {
  transform: translateY(-4px) rotate(-5deg) scale(1.08);
  background: #C2562B; color: #F3F0E9;
}
.hire-list li { transition: transform .3s cubic-bezier(.2,.7,.2,1), color .3s ease; }
.hire-card:hover .hire-list li { transform: translateX(4px); }
.hire-card:hover .hire-list li:nth-child(1) { transition-delay: 0s; }
.hire-card:hover .hire-list li:nth-child(2) { transition-delay: .05s; }
.hire-card:hover .hire-list li:nth-child(3) { transition-delay: .1s; }
.hire-card:hover .hire-list li:nth-child(4) { transition-delay: .15s; }
.hire-list li::before { transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.hire-card:hover .hire-list li::before { transform: translateX(3px); }

/* ---------- Content cards: image zoom + tag slide ---------- */
.content-thumb { transform: translateZ(0); }
.content-thumb .thumb-img { transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.content-card:hover .thumb-img { transform: scale(1.07); }
.thumb-tag { position: relative; z-index: 1; transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.content-card:hover .thumb-tag { transform: translateY(-3px); }
.content-cta { transition: color .25s ease, transform .3s cubic-bezier(.2,.7,.2,1); }
.content-card:hover .content-cta { transform: translateX(4px); }

/* ---------- Footer social: pop ---------- */
.social { transition: background-color .2s ease, color .2s ease, transform .25s cubic-bezier(.34,1.56,.64,1); }
.social:hover { transform: translateY(-3px) rotate(8deg); }

/* ===========================================================
   HERO — left-aligned, image-backed panel
   =========================================================== */
/* full-bleed: the artwork runs to every edge and up behind the nav */
.hero-x { padding: 0; }

.hx-panel {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(100svh, 900px);
  background-color: #F3F0E9;
  display: flex; align-items: center;
}
/* one big voxel scene — cover, never tiled */
.hx-bg {
  position: absolute; inset: 0; z-index: -2;
  background-color: #F3F0E9;
  background-image: url("images/hero-voxel.svg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center bottom;
}
/* scrim: clears the headline on the left, and melts the art into paper
   at the bottom so it flows straight into the ticker */
.hx-scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to bottom,
      rgba(243,240,233,.5) 0%, rgba(243,240,233,0) 18%,
      rgba(243,240,233,0) 48%, rgba(243,240,233,.78) 88%, #F3F0E9 100%),
    linear-gradient(to right,
      #F3F0E9 0%, #F3F0E9 30%, rgba(243,240,233,.97) 46%,
      rgba(243,240,233,.7) 60%, rgba(243,240,233,0) 80%);
}

.hx-inner {
  position: relative; z-index: 1; width: 100%;
  max-width: 1180px; margin: 0 auto;
  padding: 9rem clamp(1.4rem, 4vw, 2rem) 4rem;
  text-align: left; color: #14130F;
}
@media (min-width: 1024px) { .hx-inner { padding: 9.5rem 2rem 5rem; } }
.hx-eyebrow {
  display: inline-flex; align-items: center; gap: .65rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: .25em; text-transform: uppercase;
  color: #6E6A61; margin-bottom: 1.5rem;
}
.hx-title {
  font-family: "Inter Tight", sans-serif; font-weight: 800;
  letter-spacing: -.025em; line-height: 1.08;
  font-size: clamp(1.85rem, 4.4vw, 3.55rem);
  color: #14130F; max-width: 21ch;
}
.hx-title .text-ember {
  display: inline-block;
  animation: ember-flow 5s ease-in-out infinite, hero-pulse 2.4s ease-in-out infinite;
}
@keyframes hero-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }

.hx-sub {
  margin-top: 1.7rem; max-width: 33rem;
  color: #6E6A61; line-height: 1.62;
  font-size: clamp(.95rem, 1.35vw, 1.05rem);
}
.hx-ctas { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .8rem; }

/* hero buttons (dark on the light panel) */
.hx-btn, .hx-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.6rem; border-radius: 9999px;
  font-size: .9rem; font-weight: 600; line-height: 1; white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, transform .2s ease, border-color .2s ease;
}
.hx-btn { background: #14130F; color: #F3F0E9; }
.hx-btn:hover { background: #C2562B; transform: translateY(-1px); }
.hx-btn svg { transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.hx-btn:hover svg { transform: translate(2px,-2px); }
.hx-btn-ghost { border: 1px solid rgba(20,19,15,.22); color: #14130F; background: rgba(243,240,233,.6); }
.hx-btn-ghost:hover { background: #14130F; color: #F3F0E9; border-color: #14130F; }

/* headshot pill on the light hero — scaled to match the smaller title */
.hero-x .hero-pill {
  width: clamp(38px, 5.6vw, 62px); height: clamp(27px, 3.8vw, 42px);
  box-shadow: inset 0 0 0 3px #F3F0E9; vertical-align: middle;
}
.hero-pin { width: clamp(19px, 2.6vw, 30px); height: auto; }

/* --- stats ticker along the bottom of the hero --- */
.hx-marquee {
  position: relative; z-index: 1;
  margin-top: -1px;              /* butt straight up against the artwork */
  padding: 1rem 0;
  background: #F3F0E9;
  border-bottom: 1px solid rgba(20,19,15,.1);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.js .hx-marquee { opacity: 0; animation: hero-fade-up .8s ease .8s forwards; }
.hx-marquee-track { display: flex; width: max-content; animation: hx-marquee 38s linear infinite; }
.hx-marquee-half {
  display: flex; align-items: center; gap: 2.4rem; padding-right: 2.4rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(110,106,97,.9); white-space: nowrap;
}
.hx-star { color: #C2562B; font-size: 9px; }
@keyframes hx-marquee { to { transform: translateX(-50%); } }
.hx-marquee:hover .hx-marquee-track { animation-play-state: paused; }

/* entrance: eyebrow → title → sub → ctas */
.js .hx-eyebrow { opacity: 0; animation: hero-fade-up .7s cubic-bezier(.2,.65,.3,1) .1s forwards; }
.js .hx-title   { opacity: 0; animation: hero-fade-up .8s cubic-bezier(.2,.65,.3,1) .25s forwards; }
.js .hx-sub     { opacity: 0; animation: hero-fade-up .8s cubic-bezier(.2,.65,.3,1) .5s forwards; }
.js .hx-ctas    { opacity: 0; animation: hero-fade-up .8s cubic-bezier(.2,.65,.3,1) .65s forwards; }
@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* headshot pill bob + location pin settle */
.js .hero-pill { animation: pill-bob 5s ease-in-out 1s infinite; }
.js .hero-pin {
  opacity: 0; transform: translateY(-12px) scale(.6);
  animation: pin-drop .55s cubic-bezier(.34,1.7,.5,1) .9s forwards;
}
@keyframes pin-drop {
  60%  { opacity: 1; transform: translateY(2px) scale(1.05); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* tablet: hold the scene to the bottom-right so the copy stays clear */
@media (max-width: 1024px) {
  .hx-bg { background-size: auto 68%; background-position: right -18% bottom -2%; }
  .hx-scrim {
    background:
      linear-gradient(to bottom,
        rgba(243,240,233,.6) 0%, rgba(243,240,233,0) 30%,
        rgba(243,240,233,.6) 86%, #F3F0E9 100%),
      linear-gradient(to right,
        #F3F0E9 0%, rgba(243,240,233,.92) 40%,
        rgba(243,240,233,.5) 62%, rgba(243,240,233,0) 82%);
  }
}

/* phone: the scene sits as a band under the copy */
@media (max-width: 640px) {
  .hx-panel { min-height: min(92svh, 760px); align-items: flex-start; }
  .hx-inner { padding-top: 7.5rem; padding-bottom: 2rem; }
  .hx-title { max-width: 100%; }
  .hero-x .hero-pill { width: 46px; height: 33px; box-shadow: inset 0 0 0 3px #F3F0E9; }
  .hx-bg { background-size: auto 42%; background-position: right -34% bottom 0; }
  .hx-scrim {
    background:
      linear-gradient(to bottom,
        rgba(243,240,233,.5) 0%, rgba(243,240,233,.85) 42%,
        rgba(243,240,233,.35) 62%, rgba(243,240,233,.9) 94%, #F3F0E9 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .hx-eyebrow, .js .hx-title, .js .hx-sub, .js .hx-ctas, .js .hero-pill, .js .hero-pin, .js .hx-marquee {
    opacity: 1 !important; transform: none !important; animation: none !important;
  }
  .hx-title .text-ember { animation: none; transform: none; }
  .hx-marquee-track { animation: none !important; }
}

/* ---------- Dark sections: slow ember aurora ---------- */
.bg-dark { position: relative; overflow: hidden; }
.bg-dark::before {
  content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(38% 45% at 18% 20%, rgba(194,86,43,.10), transparent 70%),
    radial-gradient(30% 38% at 85% 75%, rgba(194,86,43,.07), transparent 70%);
  animation: aurora 18s ease-in-out infinite alternate;
  pointer-events: none;
}
.bg-dark > * { position: relative; }
@keyframes aurora {
  from { transform: translate(0,0) rotate(0deg); }
  to   { transform: translate(4%,6%) rotate(3deg); }
}

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid #C2562B; outline-offset: 3px; border-radius: 6px;
}

/* ---------- Legal pages (terms / privacy) ---------- */
.legal-prose { color: #4d4a44; font-size: 15px; line-height: 1.75; }
.legal-prose h2 {
  font-family: "Inter Tight", sans-serif; font-weight: 800; letter-spacing: -.02em;
  color: #14130F; font-size: 1.35rem; margin: 2.75rem 0 .9rem;
}
.legal-prose h2:first-of-type { margin-top: 0; }
.legal-prose h3 {
  font-family: "Inter Tight", sans-serif; font-weight: 700; color: #14130F;
  font-size: 1.05rem; margin: 1.75rem 0 .6rem;
}
.legal-prose p { margin-bottom: 1rem; }
.legal-prose ul { margin: 0 0 1rem 1.25rem; list-style: disc; }
.legal-prose li { margin-bottom: .5rem; }
.legal-prose a { color: #C2562B; text-decoration: underline; text-underline-offset: 3px; }
.legal-prose a:hover { color: #14130F; }
.legal-prose strong { color: #14130F; font-weight: 600; }
.legal-prose .lead { font-size: 16px; color: #6E6A61; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-left, .reveal-right, .reveal-scale { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .animate-ping { animation: none; }
  * { transition-duration: .01ms !important; animation: none !important; }
  .orb, .ambient, .bg-dark::before { animation: none !important; }
  .text-ember {
    background: none; -webkit-text-fill-color: initial; color: #C2562B; animation: none;
  }
}
