/* ============================================================
   sections.css — stack panels, hero, about, capabilities,
   work, archive, experience, background, contact, footer
   ============================================================ */

/* ---------- sticky stack panels ----------
   Each major section lives in a .stack-panel. When JS + motion
   are available (html.stack-on), panels become sticky and each
   new panel slides over the previous one, which scales down and
   dims (scrubbed in animations.js). ---------- */

.stack {
  position: relative;
}

.stack-panel {
  position: relative;
  background: var(--bg-0);
}

.stack-panel__inner {
  position: relative;
  transform-origin: center;
}

.stack-panel__dim {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: var(--bg-0);
  opacity: 0;
  pointer-events: none;
}

html.stack-on .stack-panel {
  position: sticky;
  top: 0;
}

html.stack-on .stack-panel:not(:first-child) {
  overflow: hidden;
  border-radius: var(--radius-panel) var(--radius-panel) 0 0;
  box-shadow: 0 -34px 80px -26px rgba(0, 0, 0, 0.9);
}

/* ember hairline + top wash where a panel overlaps the previous */
html.stack-on .stack-panel:not(:first-child)::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: 30;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(77, 141, 255, 0.45), transparent);
  pointer-events: none;
}

html.stack-on .stack-panel:not(:first-child)::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: 20;
  height: 6rem;
  background: linear-gradient(to bottom, rgba(77, 141, 255, 0.07), transparent);
  pointer-events: none;
}

/* panels breathe to at least a viewport; content centres vertically */
html.stack-on .section {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: clip;
  padding-block: calc(var(--nav-h) + 2rem) 5.5rem;
}

/* CSS halo — one quiet pool of light breathing behind the content,
   with a smaller cool counter-glow offset high right. Only transform
   and opacity animate, so it stays cheap on weak machines. */
.hero__halo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero__halo span {
  position: absolute;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
}

.hero__halo-a {
  width: 92vmax;
  left: 50%;
  top: 40%;
  background: radial-gradient(circle,
    rgba(77, 141, 255, 0.22) 0%,
    rgba(43, 92, 210, 0.13) 32%,
    rgba(18, 42, 96, 0.06) 56%,
    rgba(5, 8, 15, 0) 72%);
  animation: halo-breathe 13s ease-in-out infinite;
}

.hero__halo-b {
  width: 54vmax;
  left: 72%;
  top: 18%;
  background: radial-gradient(circle,
    rgba(156, 196, 255, 0.14) 0%,
    rgba(77, 141, 255, 0.06) 40%,
    rgba(5, 8, 15, 0) 68%);
  animation: halo-breathe 17s ease-in-out -6s infinite reverse;
}

@keyframes halo-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(0.94); opacity: 0.72; }
  50% { transform: translate(-50%, -50%) scale(1.07); opacity: 1; }
}

/* stripe canvas — full-bleed WebGL flowing line field (halo behind it
   is the no-WebGL fallback) */
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* the name is never static — a soft light keeps sweeping across it.
   background-image/size only (a `background` shorthand would reset
   the text clip from base.css) */
.hero__title .grad-silver {
  background-image: linear-gradient(110deg,
    #F4F7FC 0%, #AFC2E4 22%, #FFFFFF 46%, #D6E4FF 54%, #AFC2E4 78%, #F4F7FC 100%);
  background-size: 220% 100%;
  animation: name-shine 4.5s linear infinite;
}

.hero__title .grad-text {
  background-image: linear-gradient(110deg,
    #4D8DFF 0%, #9CC4FF 30%, #E2EEFF 50%, #9CC4FF 70%, #4D8DFF 100%);
  background-size: 220% 100%;
  animation: name-shine 4.5s linear infinite;
}

@keyframes name-shine {
  to { background-position: -220% 0; }
}

/* engineering grid retired for the glossy-tube hero — squares over
   the render read as a template, the reference keeps it clean */
.hero__grid {
  display: none;
}

/* darken the middle so the headline always reads over the fibers */
.hero__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 62% 56% at 50% 44%, rgba(5, 8, 15, 0.58) 0%, rgba(5, 8, 15, 0.24) 55%, transparent 100%);
}

/* top scrim so the nav always reads over bright rivers */
.hero::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: 0;
  height: 9rem;
  background: linear-gradient(to bottom, rgba(5, 8, 15, 0.85), transparent);
  pointer-events: none;
}

.hero::after {
  /* blend canvas into the page */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18vh;
  background: linear-gradient(to bottom, transparent, var(--bg-0));
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 62rem;
}

/* ---------- circular portrait + floating stat chips ---------- */

.hero__intro {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.hero__avatar {
  position: relative;
  width: clamp(116px, 11vw, 156px);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 6px;
}

/* soft glow behind the circle */
.hero__avatar::before {
  content: "";
  position: absolute;
  inset: -55%;
  z-index: -1;
  background: radial-gradient(circle, rgba(77, 141, 255, 0.28), transparent 62%);
}

/* static faint ring so the circle is always defined */
.hero__avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(77, 141, 255, 0.3);
}

/* rotating conic arc — the "live" ring */
.hero__avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent 0deg 30deg,
    rgba(77, 141, 255, 0.9) 120deg,
    rgba(156, 196, 255, 1) 175deg,
    rgba(77, 141, 255, 0.9) 230deg,
    transparent 320deg 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 2.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 2.5px));
  animation: avatar-spin 7s linear infinite;
}

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

.hero__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: saturate(0.92) contrast(1.05) brightness(0.98);
}


.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  align-self: start;
  padding: 0.55em 1.1em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(10, 16, 29, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--text-2);
  margin-bottom: 1.25rem;
}

.hero__kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(77, 141, 255, 0.9);
}

.hero__x {
  color: var(--accent);
}

/* the name — short, so it can run larger than --fs-display.
   No text-shadow: it would bleed through the clipped gradient glyphs. */
.hero__title {
  font-size: clamp(3.25rem, 7.6vw, 6.75rem);
  letter-spacing: -0.02em;
  line-height: 0.98;
}

.hero__mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.hero__line {
  display: block;
}

/* domain — a real sub-headline, not a label */
.hero__role {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.2vw, 1.75rem);
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--text-1);
}

.hero__lede {
  margin-top: 1.4rem;
  max-width: 40rem;
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
}

/* ---------- workflow diagram — AI core wired to capability nodes,
   light pulses travel outward along the circuit lines ---------- */

.hero__flow {
  --ics: 46px; /* node icon size */
  position: relative;
  width: min(100%, 54rem);
  margin-top: 2.25rem;
  aspect-ratio: 860 / 190;
}

.hero__flow-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.flow-line {
  stroke: rgba(156, 196, 255, 0.16);
  stroke-width: 1.5;
}

.flow-pulse {
  stroke: var(--accent-2);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 26 600;
  stroke-dashoffset: 626;
  animation: flow-dash 3.6s linear infinite;
  filter: drop-shadow(0 0 5px rgba(156, 196, 255, 0.9));
}

@keyframes flow-dash {
  to { stroke-dashoffset: 0; }
}

.hero__flow-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(160deg, #101A2E, #05080F);
  border: 1px solid rgba(77, 141, 255, 0.55);
  box-shadow: 0 0 36px rgba(77, 141, 255, 0.3);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--text-1);
}

/* chip socket — faint outer frame */
.hero__flow-chip::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 20px;
  border: 1px solid rgba(77, 141, 255, 0.22);
}

.hero__flow-node {
  position: absolute;
  left: var(--fx);
  top: calc(var(--fy) - var(--ics) / 2);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.hero__flow-ic {
  width: var(--ics);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(160deg, #0C1322, #05080F);
  border: 1px solid var(--line-strong);
  color: var(--accent-2);
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.9);
}

.hero__flow-ic svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero__flow-lb {
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  color: var(--text-3);
}

.hero__cta {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.hero__links {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.75rem;
}


.hero__link {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-3);
  transition: color 0.25s ease;
}

.hero__link:hover {
  color: var(--text-1);
}

.hero__link-arrow {
  color: var(--accent);
  display: inline-block;
  margin-left: 0.3em;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero__link:hover .hero__link-arrow {
  transform: translate(2px, -2px);
}

/* tech-stack ticker along the hero's bottom edge */
.hero__ticker {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 1;
  padding-block: 1.15rem;
  border-top: 1px solid var(--line);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 14%, black 86%, transparent);
          mask-image: linear-gradient(to right, transparent, black 14%, black 86%, transparent);
}

.hero__ticker-track {
  display: flex;
  width: max-content;
  animation: hero-ticker 42s linear infinite;
}

.hero__ticker-seq {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-3);
  white-space: nowrap;
}

.hero__ticker-seq i {
  font-style: normal;
  color: var(--accent);
  margin-inline: 1.6em;
  opacity: 0.7;
}

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

/* ---------- 01 about — glass panel: two-column intro text
   over a grid of tinted expertise-area cards ---------- */

.about__wrap {
  max-width: 74rem;
}

.about__heading {
  margin-bottom: clamp(2rem, 5vh, 3rem);
}

.about__panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: rgba(10, 16, 29, 0.5);
  padding: clamp(1.5rem, 3.2vw, 2.75rem);
}

.about__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.about__cols p {
  max-width: none;
  line-height: 1.75;
}

/* tinted expertise-area mini cards (--ac per card) */
.about__areas {
  margin-top: clamp(1.75rem, 4vh, 2.5rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.area {
  border: 1px solid color-mix(in srgb, var(--ac) 28%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--ac) 8%, transparent);
  padding: 1.1rem 1.2rem;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.area:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--ac) 55%, transparent);
}

.area__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--ac);
  font-weight: 500;
}

.area__head svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: var(--ac);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.area__desc {
  margin: 0.45rem auto 0;
  font-size: 0.88em;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 34ch;
}

/* ---------- 02 expertise — skill cards with hover popovers
   (proficiency bar + description + tags, zainattiq-style) ---------- */

.caps__wrap {
  max-width: 74rem;
}

/* centered header: label, title, one quiet subtitle line */
.caps__head {
  text-align: center;
  max-width: 46rem;
  margin: 0 auto clamp(2.5rem, 6vh, 3.75rem);
}

.caps__head .section-title {
  margin-bottom: 1.1rem;
}

.caps__sub {
  color: var(--text-2);
  max-width: 46ch;
  margin: 0 auto;
  font-size: 1.05em;
  line-height: 1.65;
}

.skillx-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  max-width: 64rem;
  margin-inline: auto;
}

.skillx {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 26, 46, 0.5), rgba(10, 16, 29, 0.2));
  padding: 1.7rem 1.4rem 1.5rem;
  text-align: center;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.skillx:hover {
  border-color: var(--sx);
  transform: translateY(-4px);
  z-index: 5;
}

.skillx__ic {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.9rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--sx) 45%, transparent);
  background: color-mix(in srgb, var(--sx) 12%, transparent);
}

.skillx__ic svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--sx);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skillx__title {
  font-size: 1.1rem;
  line-height: 1.25;
}

.skillx__chips,
.skillx__pop-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.skillx__chips {
  margin-top: 0.75rem;
}

.skillx__chips span,
.skillx__pop-tags span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-2);
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 8, 15, 0.4);
}

/* hover popover — name, proficiency bar, description, full tags.
   Opens BELOW the card (above collided with the fixed nav on the
   first row) and stays interactive so moving onto it keeps it open */
.skillx__pop {
  position: absolute;
  left: 50%;
  top: calc(100% + 12px);
  transform: translateX(-50%) translateY(-6px);
  width: min(300px, 84vw);
  padding: 1rem 1.1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--sx) 35%, transparent);
  background: rgba(8, 13, 24, 0.97);
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.85);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  text-align: left;
  z-index: 20;
}

.skillx__pop::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -6px;
  border: 6px solid transparent;
  border-bottom-color: rgba(8, 13, 24, 0.97);
}

.skillx:hover .skillx__pop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* flipped variant — JS adds .skillx--up on hover when there's
   enough viewport room above the card */
.skillx--up .skillx__pop {
  top: auto;
  bottom: calc(100% + 12px);
  transform: translateX(-50%) translateY(6px);
}

.skillx--up .skillx__pop::after {
  bottom: auto;
  top: 100%;
  border-bottom-color: transparent;
  border-top-color: rgba(8, 13, 24, 0.97);
}

.skillx__pop-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  color: var(--text-1);
}

.skillx__pop-head span {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--sx);
}

.skillx__bar {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: rgba(235, 242, 255, 0.08);
  margin: 0.6rem 0 0.8rem;
  overflow: hidden;
}

.skillx__bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--sx);
  transition: width 0.7s ease 0.15s;
}

.skillx:hover .skillx__bar i {
  width: var(--p);
}

.skillx__pop > p {
  font-size: 0.88em;
  line-height: 1.55;
  color: var(--text-2);
  max-width: none;
}

.skillx__pop-tags {
  margin-top: 0.7rem;
  justify-content: flex-start;
}

/* ---------- legacy numbered service list (unused markup) ---------- */

.svc-list {
  border-top: 1px solid var(--line);
}

.svc {
  position: relative;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1.05fr) minmax(0, 1.45fr) 3.25rem;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  padding: clamp(1.5rem, 2.6vw, 2.1rem) clamp(1rem, 2vw, 1.75rem);
  margin-inline: calc(-1 * clamp(1rem, 2vw, 1.75rem));
  border-radius: var(--radius);
  transition: background-color 0.35s ease;
}

/* hairline between rows — kept inside the container edges */
.svc::after {
  content: "";
  position: absolute;
  inset-inline: clamp(1rem, 2vw, 1.75rem);
  bottom: 0;
  height: 1px;
  background: var(--line);
}

/* cursor spotlight (--mx / --my set from JS) */
.svc::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(77, 141, 255, 0.09), transparent 65%);
  pointer-events: none;
}

.svc:hover {
  background-color: rgba(20, 34, 61, 0.55);
}

.svc:hover::before {
  opacity: 1;
}

.svc__num {
  color: var(--text-3);
  transition: color 0.3s ease;
}

.svc:hover .svc__num {
  color: var(--accent);
}

.svc__title {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  letter-spacing: -0.015em;
  line-height: 1.08;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.svc:hover .svc__title {
  transform: translateX(6px);
}

.svc__desc {
  font-size: 0.9688rem;
  max-width: 46ch;
}

.svc__tags {
  margin-top: 0.7rem;
  color: var(--text-3);
  letter-spacing: 0.1em;
}

.svc__arrow {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 3rem;
  aspect-ratio: 1;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text-2);
  font-size: 1.1rem;
  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.svc:hover .svc__arrow {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--bg-0);
  transform: rotate(45deg);
}

/* ---------- 03 all projects — filterable card grid, in sequence ---------- */

.work__noscript {
  color: var(--text-2);
  padding-block: 2rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: -1rem 0 clamp(2rem, 5vh, 3rem);
}

.filter-btn {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-2);
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

.filter-btn:hover {
  border-color: rgba(77, 141, 255, 0.45);
  color: var(--text-1);
}

.filter-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0A1224;
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.filters--center {
  justify-content: center;
}

.proj-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--bg-1) 0%, var(--bg-0) 70%);
  padding: 1.3rem 1.35rem 1.35rem;
  transition: border-color 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.proj-card:hover {
  border-color: color-mix(in srgb, var(--pc, #4D8DFF) 55%, transparent);
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.7);
}

.proj-card.is-hidden {
  display: none;
}

/* head row: index in the card's tint, category chip, featured badge */
.proj-card__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.proj-card__index {
  color: var(--pc, var(--accent));
}

.proj-card__cat {
  margin-left: auto;
  color: var(--pc, #4D8DFF);
  border: 1px solid color-mix(in srgb, var(--pc, #4D8DFF) 40%, transparent);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.6875rem;
}

.proj-card__star {
  color: var(--accent-2);
  border: 1px solid rgba(156, 196, 255, 0.35);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.6875rem;
}

.proj-card__title {
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* readable sentence-case line, not cramped caps */
.proj-card__subtitle {
  margin-top: 0.35rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--accent-2);
  max-width: none;
}

.proj-card__desc {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: none;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* chips pinned to the bottom so all cards align */
.proj-card__chips {
  margin-top: auto;
  padding-top: 1.1rem;
}

.chip--more {
  color: var(--accent-2);
  border-color: rgba(156, 196, 255, 0.35);
}

/* ---------- 05 websites — live screenshot cards ---------- */

/* case-study rows — browser-framed screenshot one side, story the
   other, alternating each row */
.sites-show {
  display: grid;
  gap: clamp(4rem, 9vh, 6.5rem);
}

.site-row {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(1.75rem, 4vw, 4rem);
  align-items: center;
}

.site-row:nth-child(even) .site-shot {
  order: 2;
}

.site-shot {
  position: relative;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-1);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.85);
  transition: border-color 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.site-shot:hover {
  transform: translateY(-5px);
  border-color: rgba(77, 141, 255, 0.45);
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.9),
    0 0 60px -18px rgba(43, 92, 210, 0.5);
}

.site-shot__frame {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.site-shot__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.site-info__idx {
  color: var(--accent);
  margin-bottom: 1rem;
}

.site-info__title {
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin-bottom: 0.9rem;
}

.site-info__blurb {
  color: var(--text-2);
  max-width: 40ch;
}

.site-info__dom {
  margin-top: 1.1rem;
  color: var(--text-3);
}

.site-info__btn {
  margin-top: 1.5rem;
  display: inline-flex;
}

.site-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, var(--bg-1) 0%, var(--bg-0) 70%);
  transition: border-color 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-card:hover {
  border-color: rgba(77, 141, 255, 0.5);
  transform: translateY(-4px);
}

/* browser-chrome bar — three dots + domain pill, "real window" look */
.site-card__bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  background: rgba(10, 16, 29, 0.9);
  border-bottom: 1px solid var(--line);
}

.site-card__bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(235, 242, 255, 0.16);
}

.site-card__dom {
  margin-inline: auto;
  padding: 0.3rem 1.2rem;
  border-radius: 999px;
  background: rgba(5, 8, 15, 0.6);
  border: 1px solid var(--line);
  color: var(--text-3);
  font-size: 0.7rem;
}

/* static screenshot — the site's own top fold, no motion on hover */
.site-card__frame {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.site-card__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.site-card__body {
  display: block;
  padding: clamp(1.1rem, 2vw, 1.6rem);
}

.site-card__title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  letter-spacing: -0.015em;
  color: var(--text-1);
}

.site-card__arrow {
  color: var(--accent);
  display: inline-block;
  margin-left: 0.4em;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-card:hover .site-card__arrow {
  transform: translate(3px, -3px);
}

.site-card__blurb {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: var(--text-2);
}

.site-card__url {
  display: block;
  margin-top: 0.9rem;
  color: var(--accent);
}

/* ---------- 06 experience ---------- */

.exp__list {
  display: flex;
  flex-direction: column;
}

.exp-row {
  position: relative;
  padding-block: clamp(2rem, 4.5vh, 3.25rem);
}

.exp-row__line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, rgba(77, 141, 255, 0.35), var(--line) 40%);
  transform-origin: left;
}

.exp-row__grid {
  display: grid;
  grid-template-columns: minmax(150px, 3fr) 9fr;
  gap: clamp(1.25rem, 4vw, 4rem);
  align-items: start;
}

.exp-row__period {
  padding-top: 0.4rem;
}

.exp-row__role {
  font-size: var(--fs-h3);
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.exp-row__org {
  margin-top: 0.5rem;
  color: var(--accent);
}

.exp-row__points {
  margin-top: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 62ch;
}

.exp-row__points li {
  padding-left: 1.25rem;
  position: relative;
}

.exp-row__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 1px;
  background: var(--accent);
}

/* ---------- 06 background: skills + education ---------- */

.skills__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.skill-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--bg-1) 0%, var(--bg-0) 70%);
  padding: clamp(1.5rem, 2.6vw, 2.25rem);
}

.skill-group__title {
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.edu__grid {
  margin-top: clamp(3rem, 7vh, 5rem);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
}

.edu__col-title {
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.edu-item {
  border-top: 1px solid var(--line);
  padding-block: 1.25rem;
}

.edu-item__title {
  color: var(--text-1);
  font-weight: 500;
}

.edu-item__meta {
  margin-top: 0.4rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.edu-item__note {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
}

/* ---------- 07 contact ---------- */

.contact {
  overflow: clip;
}

.contact__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact__inner .section-title {
  margin-inline: auto;
}

.contact__kicker {
  color: var(--accent-2);
  margin-bottom: 1.25rem;
}

.contact__title {
  max-width: 16ch;
  margin-bottom: clamp(2rem, 5vh, 3rem);
}

.contact__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.contact__email {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3.4vw, 2.75rem);
  letter-spacing: -0.01em;
  color: var(--text-1);
  position: relative;
  transition: color 0.3s ease;
}

.contact__email::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact__email:hover {
  color: var(--accent-2);
}

.contact__email:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.contact__hint.is-copied {
  color: var(--accent);
}

.contact__alt {
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.contact__socials {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.contact__social {
  display: inline-flex;
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-2);
  transition: border-color 0.3s ease, color 0.3s ease;
}

.contact__social:hover {
  border-color: rgba(77, 141, 255, 0.55);
  color: var(--text-1);
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding-block: 1.75rem;
  background: var(--bg-0);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer__top {
  color: var(--text-2);
  transition: color 0.25s ease;
}

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

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .svc {
    grid-template-columns: 2.75rem minmax(0, 1fr) 3rem;
    grid-template-areas:
      "num title arrow"
      "num body  arrow";
    align-items: start;
    row-gap: 0.6rem;
  }

  .svc__num { grid-area: num; }
  .svc__title { grid-area: title; }
  .svc__body { grid-area: body; }

  .svc__arrow {
    grid-area: arrow;
    align-self: center;
  }
}

@media (max-width: 1180px) {
  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .site-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .site-row:nth-child(even) .site-shot {
    order: 0;
  }

  .about__cols {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .about__areas {
    grid-template-columns: repeat(2, 1fr);
  }

  .skillx-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills__grid,
  .edu__grid,
  .projects__grid,
  .sites__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .about__areas,
  .skillx-grid {
    grid-template-columns: 1fr;
  }

  .svc {
    grid-template-columns: 2.25rem minmax(0, 1fr);
    grid-template-areas:
      "num title"
      "num body";
    padding-inline: 0.75rem;
    margin-inline: -0.75rem;
  }

  .svc::after {
    inset-inline: 0.75rem;
  }

  .svc__arrow {
    display: none;
  }

  .svc__title {
    font-size: 1.35rem;
  }

  .exp-row__grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .hero__flow {
    --ics: 38px;
    margin-top: 1.75rem;
  }

  .hero__flow-ic svg {
    width: 16px;
    height: 16px;
  }

  .hero__flow-lb {
    font-size: 0.5625rem;
  }

  .hero__flow-chip {
    width: 52px;
    font-size: 1.1rem;
    border-radius: 13px;
  }
}
