/* ==========================================================================
   skorp portfolio
   Apple HIG applied to the web:
   - system type first, 17px body, nothing under 13px
   - semantic color tokens, light + dark from the OS setting (no in-site toggle)
   - glass only on the floating nav (functional layer), never on content
   - accent reserved for primary actions, the selected nav item and status
   ========================================================================== */

:root {
  /* Surfaces */
  --bg:            #FFFFFF;
  --bg-alt:        #F5F5F7;
  --surface:       #F5F5F7;   /* cards on --bg */
  --surface-alt:   #FFFFFF;   /* cards on --bg-alt */

  /* Content */
  --label:         #1D1D1F;   /* 16.8:1 on #FFF */
  --label-2:       #6E6E73;   /* 5.1:1 on #FFF, 4.7:1 on #F5F5F7 */
  --separator:     rgba(0, 0, 0, 0.1);

  /* Accent: primary actions, selected nav item, status */
  --accent:        #5B4FE0;   /* 5.8:1 with white text; 5.3:1 as text on #F5F5F7 */
  --on-accent:     #FFFFFF;
  --status:        #1F9D55;

  /* Island (always dark, like the hardware it nods to) */
  --island-bg:     #1D1D1F;
  --island-label:  #F5F5F7;   /* 15.5:1 */
  --island-label-2:#A1A1A6;   /* 6.5:1 */

  /* Glass nav */
  --glass-fill:    rgba(255, 255, 255, 0.72);
  --glass-border:  rgba(0, 0, 0, 0.08);
  --glass-shadow:  0 8px 30px rgba(0, 0, 0, 0.08);

  --focus:         #5B4FE0;

  /* Type */
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;

  /* Layout */
  --max: 1080px;
  --gutter: clamp(16px, 5vw, 32px);
  --radius-card: 22px;
  --radius-control: 999px;
  --section-pad: clamp(80px, 12vw, 140px);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #000000;
    --bg-alt:        #0B0B0C;
    --surface:       #1C1C1E;
    --surface-alt:   #1C1C1E;
    --label:         #F5F5F7;   /* 19.3:1 on #000 */
    --label-2:       #A1A1A6;   /* 8.2:1 on #000, 6.6:1 on #1C1C1E */
    --separator:     rgba(255, 255, 255, 0.14);
    --accent:        #8E86FF;   /* 7.0:1 on #000, 5.7:1 on #1C1C1E */
    --on-accent:     #000000;   /* 7.0:1 */
    --status:        #30D158;
    --island-bg:     #1C1C1E;
    --glass-fill:    rgba(28, 28, 30, 0.72);
    --glass-border:  rgba(255, 255, 255, 0.12);
    --glass-shadow:  0 8px 30px rgba(0, 0, 0, 0.5);
    --focus:         #8E86FF;
  }
}

/* Increase Contrast */
@media (prefers-contrast: more) {
  :root {
    --label-2: #3A3A3C;
    --separator: rgba(0, 0, 0, 0.35);
    --glass-fill: #FFFFFF;
    --glass-border: rgba(0, 0, 0, 0.4);
  }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root {
    --label-2: #D1D1D6;
    --separator: rgba(255, 255, 255, 0.4);
    --glass-fill: #1C1C1E;
    --glass-border: rgba(255, 255, 255, 0.5);
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font-family: var(--font-text);
  font-size: 1.0625rem;      /* 17px, HIG body default */
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul[role="list"] { list-style: none; padding: 0; }
img { max-width: 100%; display: block; }

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 8px;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-control);
  font-weight: 600;
}
.skip-link:focus { top: 16px; }

/* ---------- Glass nav (functional layer) ---------- */

.nav-wrap {
  position: fixed;
  inset: 12px 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding-inline: 12px;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 640px;
  padding: 6px 6px 6px 18px;
  border-radius: var(--radius-control);
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav { background: var(--bg); }
}
@media (prefers-reduced-transparency: reduce) {
  .nav {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.nav-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  margin-right: auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
  padding: 0;
  gap: 2px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 14px;
  border-radius: var(--radius-control);
  font-size: 0.9375rem;   /* 15px */
  font-weight: 500;
  color: var(--label-2);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-links a:hover { color: var(--label); background: var(--separator); }
.nav-links a[aria-current="true"] { color: var(--accent); }

@media (max-width: 480px) {
  .nav { padding-left: 14px; gap: 0; }
  .nav-links a { padding-inline: 10px; font-size: 0.875rem; }
}
@media (max-width: 360px) {
  .nav-name { display: none; }
  .nav { justify-content: center; padding-left: 6px; }
}

/* ---------- Buttons & links ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-control);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.15s ease, background-color 0.15s ease, filter 0.15s ease;
}
.button-primary { background: var(--accent); color: var(--on-accent); }
.button-primary:hover { filter: brightness(1.08); }
.button-secondary {
  color: var(--label);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--separator);
}
.button-secondary:hover { background: var(--separator); }
.button:active { transform: scale(0.97); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  font-weight: 500;
  color: var(--accent);
}
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link .arrow { transition: transform 0.15s ease; }
.text-link:hover .arrow { transform: translate(2px, -2px); }

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(140px, 22vw, 220px);
  padding-bottom: var(--section-pad);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 6.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin-top: 40px;
}

.hero-lede {
  margin-top: 20px;
  max-width: 28ch;
  font-size: clamp(1.3125rem, 2.6vw, 1.75rem);
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--label-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

/* ---------- Signature: status island ---------- */

.island {
  display: inline-grid;
  max-width: 100%;
  background: var(--island-bg);
  color: var(--island-label);
  border-radius: 26px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: border-radius 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.island-pill {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 18px 0 16px;
  cursor: pointer;
  border-radius: 26px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.island-pill:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.island-kicker {
  font-family: var(--font-mono);
  font-size: 0.8125rem;   /* 13px */
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--island-label-2);
  margin-right: 6px;
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--status);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--status) 60%, transparent);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--status) 55%, transparent); }
  70%  { box-shadow: 0 0 0 8px color-mix(in srgb, var(--status) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--status) 0%, transparent); }
}

.island-chevron {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--island-label-2);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.island[data-open="true"] .island-chevron { transform: rotate(180deg); }

.island-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.island[data-open="true"] .island-detail { grid-template-rows: 1fr; }
.island-detail-inner { overflow: hidden; min-height: 0; }
.island:not([data-open="true"]) .island-detail-inner { visibility: hidden; transition: visibility 0s 0.35s; }

.island-rows {
  padding: 2px 18px 16px 42px;
  display: grid;
  gap: 10px;
}
.island-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: baseline;
}
.island-row dt {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--island-label-2);
}
.island-row dd { font-size: 0.9375rem; }

/* ---------- Sections ---------- */

.section { padding-block: var(--section-pad); }
.section-alt { background: var(--bg-alt); }
.section-alt .card { background: var(--surface-alt); }

.section-head { margin-bottom: clamp(36px, 6vw, 56px); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.035em;
}

.section-lede {
  margin-top: 16px;
  max-width: 40ch;
  font-size: 1.3125rem;
  line-height: 1.38;
  color: var(--label-2);
}

.subhead {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--label-2);
  margin-bottom: 14px;
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: clamp(24px, 3.5vw, 32px);
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 720px) {
  .projects { grid-template-columns: minmax(0, 1fr); }
}

.project { display: flex; flex-direction: column; }
/* A card left alone on the last row takes the full width */
.projects > li:last-child:nth-child(even) { grid-column: 1 / -1; }
.project-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 4vw, 40px);
  padding: clamp(16px, 2.5vw, 24px);
}
.project-featured .project-body {
  display: flex;
  flex-direction: column;
  padding: 4px clamp(8px, 2vw, 16px) 0;
}
@media (min-width: 900px) {
  .project-featured {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: center;
  }
  .project-featured .project-body { padding: 0 16px 0 0; }
}

.project-shot {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: #05060E;   /* the screenshot's own dark navy, shown while it loads */
  box-shadow: 0 0 0 1px var(--separator), 0 12px 32px rgba(0, 0, 0, 0.12);
}
.project-shot img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
}
.project-shot:hover img { transform: scale(1.02); }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: 24px;
}
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt {
  font-size: 0.8125rem;
  color: var(--label-2);
}
.stats dd {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.project-meta {
  display: flex;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--label-2);
  margin-bottom: 20px;
}
.project-kind::before { content: "·"; margin-right: 12px; }

.project-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.project-featured .project-title { font-size: clamp(1.75rem, 4vw, 2.5rem); }

.project-desc {
  margin-top: 10px;
  color: var(--label-2);
  max-width: 52ch;
}
.project-featured .project-desc { font-size: 1.1875rem; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.tags li {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 5px 11px;
  border-radius: var(--radius-control);
  box-shadow: inset 0 0 0 1px var(--separator);
  color: var(--label);
}
.tags-large li { font-family: var(--font-text); font-size: 0.9375rem; padding: 8px 16px; }

.project-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  margin-top: auto;
  padding-top: 16px;
}

/* ---------- Services ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 860px) {
  .services { grid-template-columns: minmax(0, 1fr); }
}

.service-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
}
.service-title {
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.service-desc { margin-top: 8px; color: var(--label-2); }

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(32px, 6vw, 80px);
}
@media (max-width: 760px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); }
}

.about-bio p {
  font-size: 1.3125rem;
  line-height: 1.45;
  letter-spacing: -0.015em;
  max-width: 34ch;
}
.about-bio p + p { margin-top: 1em; color: var(--label-2); }

.about-stack { display: grid; gap: 32px; align-content: start; }
.stack-list li {
  padding: 12px 0;
  border-top: 1px solid var(--separator);
}
.stack-list li:last-child { border-bottom: 1px solid var(--separator); }

/* ---------- Contact ---------- */

.contact { text-align: center; }
.contact .section-lede { margin-inline: auto; }
.contact .hero-actions { justify-content: center; }

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.contact-email {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  color: var(--label-2);
  user-select: all;
}

.socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  column-gap: 24px;
  margin-top: 32px;
}
@media (max-width: 480px) {
  .socials { column-gap: 18px; }
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--separator);
  padding-block: 20px;
  font-size: 0.875rem;
  color: var(--label-2);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.footer .text-link { font-size: 0.875rem; }

/* ==========================================================================
   Motion
   HIG motion.md: purposeful, brief, never the only carrier of meaning,
   and fully optional. Everything below switches off under Reduce Motion,
   and nothing hides content unless JavaScript is running.
   ========================================================================== */

/* Hero: ice surface + gliding puck (canvas, drawn in script.js) */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero > .container { position: relative; z-index: 1; }

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(circle at 1px 1px, var(--separator) 1px, transparent 0);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 20%, transparent 75%);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Scroll reveals */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease var(--d, 0ms),
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Status island: grows out of a dot, like the hardware it nods to */
.js .island[data-reveal="island"] {
  transform: scale(0.35);
  transform-origin: 26px 50%;
  transition:
    opacity 0.4s ease,
    transform 0.8s cubic-bezier(0.34, 1.45, 0.5, 1),
    border-radius 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.js .island[data-reveal="island"].is-in { transform: none; }
.js .island[data-reveal="island"] .island-label,
.js .island[data-reveal="island"] .island-chevron {
  opacity: 0;
  transition: opacity 0.4s ease 0.35s, transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.js .island[data-reveal="island"].is-in .island-label,
.js .island[data-reveal="island"].is-in .island-chevron { opacity: 1; }

/* Service icons draw themselves in */
.js .draw > * {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.65, 0, 0.35, 1) calc(var(--d, 0ms) + 200ms);
}
.js .is-in .draw > * { stroke-dashoffset: 0; }

/* Featured screenshot tilts toward the pointer */
.project-shot {
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.6s ease;
  will-change: transform;
}
.project-shot.is-tilting { transition-duration: 0.12s; }
.project-shot:hover { box-shadow: 0 0 0 1px var(--separator), 0 24px 48px rgba(0, 0, 0, 0.18); }

/* ---------- Text motion ---------- */

/* Headings: each word rises out of its own mask */
.js [data-reveal].split { opacity: 1; transform: none; }
.split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0 0.06em 0.14em;
  margin: 0 -0.06em -0.14em;
}
.split .wi {
  display: inline-block;
  transform: translateY(115%) rotate(6deg);
  transform-origin: 0% 100%;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1) calc(var(--d, 0ms) + var(--i, 0) * 80ms);
}
.split.is-in .wi { transform: none; }

/* Body copy: words sharpen in, one after another */
.js [data-reveal].split-soft { opacity: 1; transform: none; }
.split-soft .wi {
  display: inline-block;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(0.4em);
  transition:
    opacity 0.6s ease calc(var(--d, 0ms) + var(--i, 0) * 35ms),
    filter 0.7s ease calc(var(--d, 0ms) + var(--i, 0) * 35ms),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) calc(var(--d, 0ms) + var(--i, 0) * 35ms);
}
.split-soft.is-in .wi { opacity: 1; filter: none; transform: none; }

/* Eyebrows decode like code (driven by script.js) */
.eyebrow { min-height: 1.2em; }

/* ---------- Card motion ---------- */

.card { position: relative; isolation: isolate; }

/* Cards arrive with a little depth */
.js .card[data-reveal] {
  transform: translateY(48px) scale(0.96);
  transition:
    opacity 0.8s ease var(--d, 0ms),
    transform 1s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0ms),
    box-shadow 0.35s ease;
}
.js .card[data-reveal].is-in { transform: none; }

/* After arriving, cards answer the pointer quickly */
.js .card[data-reveal].settled {
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.45s ease;
}

/* Spotlight that follows the cursor */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
              color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%),
              color-mix(in srgb, var(--accent) 70%, transparent), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover::before,
  .card:hover::after { opacity: 1; }
  .js .card[data-reveal].settled:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.18);
  }
}

/* Tags pop in after their card */
.js .tags li {
  opacity: 0;
  transform: translateY(8px) scale(0.85);
  transition:
    opacity 0.4s ease calc(var(--d, 0ms) + 450ms + var(--t, 0) * 70ms),
    transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--d, 0ms) + 450ms + var(--t, 0) * 70ms);
}
.js .is-in .tags li { opacity: 1; transform: none; }

/* Stats lift in */
.js .stats > div {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.5s ease calc(250ms + var(--t, 0) * 110ms),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) calc(250ms + var(--t, 0) * 110ms);
}
.js .is-in .stats > div { opacity: 1; transform: none; }

/* Service icons get a soft halo while drawing */
.service-icon { transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
@media (hover: hover) and (pointer: fine) {
  .service:hover .service-icon { transform: scale(1.15) rotate(-6deg); }
}

/* About lists: lines draw across, items slide in */
.stack-list li { position: relative; border-top: 0; }
.stack-list li:last-child { border-bottom: 0; }
.stack-list li::before,
.stack-list li:last-child::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--separator);
  transform-origin: left;
}
.stack-list li::before { top: 0; }
.stack-list li:last-child::after { bottom: 0; }
.js .stack-list li { opacity: 0; transform: translateX(-16px); }
.js .stack-list li::before,
.js .stack-list li:last-child::after { transform: scaleX(0); }
.js .stack-list li,
.js .stack-list li::before,
.js .stack-list li:last-child::after {
  transition:
    opacity 0.5s ease calc(var(--d, 0ms) + 200ms + var(--t, 0) * 90ms),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) calc(var(--d, 0ms) + 200ms + var(--t, 0) * 90ms);
}
.js .is-in .stack-list li { opacity: 1; transform: none; }
.js .is-in .stack-list li::before,
.js .is-in .stack-list li:last-child::after { transform: scaleX(1); }

/* ---------- Ticker strip ---------- */

.ticker {
  overflow: hidden;
  padding-block: 22px;
  border-block: 1px solid var(--separator);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 38s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-group {
  display: flex;
  align-items: center;
  gap: 36px;
  padding-right: 36px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: var(--label);
}
.ticker-group .dim { color: var(--label-2); }
.ticker-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* ---------- Magnetic primary buttons ---------- */

.button-primary {
  transform: translate(var(--bx, 0px), var(--by, 0px));
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.15s ease;
}
.button-primary:active { transform: translate(var(--bx, 0px), var(--by, 0px)) scale(0.97); }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .js [data-reveal],
  .js .island[data-reveal="island"],
  .js .island[data-reveal="island"] .island-label,
  .js .island[data-reveal="island"] .island-chevron { opacity: 1; transform: none; }
  .js .draw > * { stroke-dashoffset: 0; }
  .split .wi,
  .split-soft .wi,
  .js .card[data-reveal],
  .js .tags li,
  .js .stats > div,
  .js .stack-list li,
  .js .stack-list li::before,
  .js .stack-list li:last-child::after { opacity: 1; filter: none; transform: none; }
  .js .card[data-reveal].settled:hover { transform: none; }
  .button-primary { transform: none; }
  .hero-canvas { display: none; }
  .project-shot { transform: none; }
}
