:root {
  --bg: #0D0D26;
  --bg-elevated: rgba(33, 33, 56, 0.72);
  --bg-soft: rgba(33, 33, 56, 0.68);
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --text: #FFFFFF;
  --muted: rgba(255, 255, 255, 0.65);
  --heading: #FFFFFF;
  --line: rgba(255, 255, 255, 0.12);
  --teal: #007AFF;
  --teal-strong: #0056b3;
  --gold: #AF52DE;
  --rose: #AF52DE;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1180px;
  --hero-shift: 0px;
  --hero-card-shift: 0px;
  --hero-grid-shift: 0px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, rgba(0, 122, 255, 0.16), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(175, 82, 222, 0.16), transparent 24%),
    radial-gradient(circle at 60% 70%, rgba(175, 82, 222, 0.12), transparent 26%),
    linear-gradient(180deg, #0D0D26 0%, #0D0D26 45%, #0D0D1F 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(circle at center, black 50%, transparent 100%);
  opacity: 0.55;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 1000;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: #ffffff;
  color: #0D0D26;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

.page-shell {
  width: min(calc(100% - 2rem), 1320px);
  margin: 0 auto;
  padding-top: 1rem;
  padding-bottom: 4rem;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.site-header {
  position: sticky;
  top: 1rem;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 1rem 0.35rem;
  border-radius: 999px;
  transition:
    padding 0.35s ease,
    transform 0.35s ease,
    top 0.35s ease;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 13, 38, 0.58);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: -1;
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

body.is-scrolled .site-header {
  top: 0.75rem;
  padding: 0.82rem 0.35rem;
}

body.is-scrolled .site-header::before {
  background: rgba(13, 13, 38, 0.76);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.26);
}

.brand-block,
.site-nav {
  display: flex;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.4rem 0.5rem 0.4rem 0.7rem;
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  object-fit: contain;
  box-shadow: 0 0 24px rgba(0, 122, 255, 0.25);
  background-color: var(--bg);
}

.brand-text {
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.92rem;
}

.site-nav {
  gap: 0.45rem;
  padding: 0.35rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    transform 0.25s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.section-shell {
  width: min(100%, var(--container));
  margin: 0 auto 2rem;
  padding: 4.5rem 0;
  position: relative;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 3rem;
  align-items: center;
  min-height: calc(100vh - 96px);
  padding-top: 3rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--teal);
}

.eyebrow::before {
  content: "";
  width: 2.6rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal));
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--heading);
}

h1,
h2 {
  font-family: "Fraunces", serif;
  line-height: 0.98;
}

h1 {
  max-width: 11ch;
  font-size: clamp(3.35rem, 8vw, 6.6rem);
  letter-spacing: -0.04em;
}

h2 {
  max-width: 11ch;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.45rem;
  line-height: 1.2;
}

p {
  margin: 0;
  line-height: 1.75;
  color: var(--muted);
}

.hero-text {
  max-width: 61ch;
  margin-top: 1.5rem;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.35rem;
  padding: 0.9rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background-color 0.25s ease;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: #0D0D26;
  background: linear-gradient(135deg, var(--gold), #d89df2 55%, var(--teal));
  box-shadow: 0 16px 32px rgba(175, 82, 222, 0.2);
}

.button-secondary {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.14);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.4rem;
}

.hero-metrics div {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow);
}

.hero-metrics dt {
  margin-bottom: 0.65rem;
  color: var(--text);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
}

.hero-metrics dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-visual {
  position: relative;
  min-height: 560px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 75% 25%, rgba(175, 82, 222, 0.18), transparent 23%),
    radial-gradient(circle at 25% 75%, rgba(0, 122, 255, 0.24), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: translate3d(0, var(--hero-shift), 0);
  transition: transform 0.45s ease-out;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent);
  transform: translate3d(0, var(--hero-grid-shift), 0);
  transition: transform 0.45s ease-out;
}

.hero-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: orbitFloat 9s ease-in-out infinite;
}

.hero-orbit-one {
  width: 320px;
  height: 320px;
  top: -40px;
  right: -40px;
}

.hero-orbit-two {
  width: 440px;
  height: 440px;
  bottom: -180px;
  left: -60px;
  animation-duration: 11s;
  animation-delay: -2.4s;
}

.hero-card {
  position: absolute;
  display: grid;
  gap: 0.5rem;
  padding: 1.45rem;
  max-width: 250px;
  border-radius: var(--radius-md);
  background: rgba(13, 13, 31, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transform: translate3d(0, var(--hero-card-shift), 0);
  transition:
    transform 0.45s ease-out,
    border-color 0.3s ease,
    background-color 0.3s ease;
}

.hero-card p,
.hero-card span {
  font-size: 0.92rem;
}

.hero-card strong {
  font-size: 1.35rem;
  color: var(--text);
}

.hero-card-primary {
  top: 18%;
  left: 8%;
}

.hero-card-secondary {
  bottom: 12%;
  right: 8%;
}

.section-heading {
  display: grid;
  gap: 1rem;
  max-width: 760px;
  margin-bottom: 2.5rem;
}

.section-heading p:last-child {
  max-width: 60ch;
}

.advantage-grid,
.portfolio-grid,
.contact-layout {
  display: grid;
  gap: 1.4rem;
}

.advantage-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.advantage-card,
.project-card,
.contact-panel,
.contact-form {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition:
    transform 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    background-color 0.35s ease;
}

.advantage-card::before,
.project-card::before,
.contact-panel::before,
.contact-form::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.advantage-card:hover,
.advantage-card:focus-within,
.project-card:hover,
.project-card:focus-within,
.contact-panel:hover,
.contact-panel:focus-within,
.contact-form:hover,
.contact-form:focus-within {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.44);
}

.advantage-card:hover::before,
.advantage-card:focus-within::before,
.project-card:hover::before,
.project-card:focus-within::before,
.contact-panel:hover::before,
.contact-panel:focus-within::before,
.contact-form:hover::before,
.contact-form:focus-within::before {
  opacity: 1;
}

.advantage-card {
  padding: 2rem;
  display: grid;
  gap: 1rem;
}

.icon-badge {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 1.1rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.18), rgba(175, 82, 222, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.icon-badge span {
  display: block;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), #ffffff);
}

.icon-badge-alt span {
  border-radius: 0.45rem;
  background: linear-gradient(135deg, var(--gold), #f2d4ff);
}

.icon-badge-accent span {
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  background: linear-gradient(135deg, var(--rose), #f2d4ff);
}

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

.project-card {
  display: grid;
}

.project-media {
  min-height: 280px;
  padding: 1.4rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 122, 255, 0.2), transparent 30%),
    linear-gradient(135deg, #15152a, #111122 55%, #212138);
  transition: transform 0.45s ease;
}

/* Two stacked device rows inside the portfolio media area.
   Each row is a self-contained showcase panel — soft inset background,
   prominent device label, and a scrollable image strip. The eye reads
   "this is the iPad showcase" and "this is the iPhone showcase" as two
   distinct sections rather than a single jumbled image strip. */
.project-screenshots {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: 0;
  min-height: 0;
}

.device-row {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.1rem 1.1rem 1.2rem;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.005));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.device-row-ipad {
  background:
    radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.1), transparent 55%),
    linear-gradient(180deg, rgba(59, 130, 246, 0.04), rgba(255, 255, 255, 0.005));
  border-color: rgba(59, 130, 246, 0.16);
}

.device-row-iphone {
  background:
    radial-gradient(circle at 0% 0%, rgba(168, 85, 247, 0.1), transparent 55%),
    linear-gradient(180deg, rgba(168, 85, 247, 0.04), rgba(255, 255, 255, 0.005));
  border-color: rgba(168, 85, 247, 0.16);
}

.device-row-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.94);
}

.device-row-label-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.7);
}

.device-row-ipad .device-row-label-dot {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.7);
}

/* Horizontal scroll strip — images stay at consistent height per device row */
.device-row-shots {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: flex-end;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.15rem;
  /* allow children to size from their height-based aspect-ratio */
  min-height: 0;
}

.device-row-shots::-webkit-scrollbar {
  display: none;
}

.project-screenshots .screenshot {
  flex: 0 0 auto;
  height: 240px;                    /* iPhone tile height — phones are taller than wide */
  width: auto;
  aspect-ratio: 1320 / 2868;
  border-radius: 18px;
  border: 1.5px solid rgba(168, 85, 247, 0.32);
  scroll-snap-align: start;
  box-shadow:
    0 14px 36px rgba(168, 85, 247, 0.16),
    0 4px 14px rgba(0, 0, 0, 0.55);
  object-fit: cover;
  background: #0d0821;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-screenshots .screenshot:hover {
  transform: translateY(-4px);
  box-shadow:
    0 22px 48px rgba(168, 85, 247, 0.26),
    0 8px 22px rgba(0, 0, 0, 0.65);
}

/* iPad tile — taller frame to communicate the larger device, blue tint */
.project-screenshots .screenshot.screenshot-ipad {
  aspect-ratio: 2048 / 2732;
  border-radius: 16px;
  height: 300px;
  border-color: rgba(96, 165, 250, 0.36);
  box-shadow:
    0 14px 36px rgba(59, 130, 246, 0.18),
    0 4px 14px rgba(0, 0, 0, 0.55);
}

.project-screenshots .screenshot.screenshot-ipad:hover {
  box-shadow:
    0 22px 48px rgba(59, 130, 246, 0.28),
    0 8px 22px rgba(0, 0, 0, 0.65);
}

.project-media-alt {
  background:
    radial-gradient(circle at 80% 20%, rgba(175, 82, 222, 0.18), transparent 28%),
    linear-gradient(135deg, #212138, #15152a 55%, #111122);
}

.project-card:hover .project-media,
.project-card:focus-within .project-media {
  transform: scale(1.03);
}

.media-placeholder {
  height: 100%;
  min-height: 250px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: calc(var(--radius-lg) - 8px);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.64);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent 55%);
}

.media-placeholder span {
  padding: 0.85rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
}

.media-placeholder-alt {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    linear-gradient(135deg, rgba(175, 82, 222, 0.08), transparent 55%);
}

.project-content {
  display: grid;
  gap: 0.9rem;
  padding: 1.75rem;
}

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

.project-kicker,
.project-status {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
}

.project-kicker {
  color: var(--teal);
}

.project-status {
  color: var(--gold);
}

.project-summary {
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.65;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  margin-top: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent, #7c3aed);
  text-decoration: none;
  transition: gap 0.15s;
}

.project-link:hover { gap: 0.5em; }

.contact-section {
  margin-bottom: 0;
}

.contact-layout {
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
}

.contact-panel,
.contact-form {
  padding: 1.75rem;
}

.contact-panel {
  display: grid;
  gap: 1.2rem;
}

.contact-list {
  display: grid;
  gap: 1rem;
}

.contact-item {
  display: grid;
  gap: 0.35rem;
  padding: 1.15rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

.contact-item:hover,
.contact-item:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.contact-item strong {
  font-size: 1.06rem;
  color: var(--text);
}

.contact-label,
.contact-aside-title {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.77rem;
  font-weight: 800;
  color: var(--teal);
}

.contact-item small {
  color: var(--muted);
}

.contact-aside {
  padding: 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-grid label {
  display: grid;
  gap: 0.55rem;
  font-size: 0.95rem;
  color: var(--text);
}

.form-full {
  grid-column: 1 / -1;
}

input,
textarea {
  width: 100%;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  padding: 0.95rem 1rem;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(0, 122, 255, 0.55);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.form-hint,
.form-status {
  font-size: 0.94rem;
}

.form-status {
  min-height: 1.5rem;
  margin-top: 0.8rem;
}

.form-status.is-error {
  color: #ff453a;
}

.form-status.is-success {
  color: #32d74b;
}

.reveal {
  --reveal-delay: 0s;
  opacity: 0;
  filter: blur(10px);
  transform: translate3d(0, 34px, 0) scale(0.985);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay),
    filter 0.8s ease var(--reveal-delay);
}

.reveal.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(1);
}

.hero-visual.reveal {
  transform: translate3d(0, calc(var(--hero-shift) + 34px), 0) scale(0.985);
}

.hero-visual.reveal.is-visible {
  transform: translate3d(0, var(--hero-shift), 0) scale(1);
}

.advantage-grid .reveal:nth-child(1),
.portfolio-grid .reveal:nth-child(1),
.contact-layout .reveal:nth-child(1) {
  --reveal-delay: 0.04s;
}

.advantage-grid .reveal:nth-child(2),
.portfolio-grid .reveal:nth-child(2),
.contact-layout .reveal:nth-child(2) {
  --reveal-delay: 0.14s;
}

.advantage-grid .reveal:nth-child(3) {
  --reveal-delay: 0.24s;
}

@keyframes orbitFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -14px, 0);
  }
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(175, 82, 222, 0.9);
  outline-offset: 3px;
}

@media (max-width: 1080px) {
  .hero,
  .contact-layout,
  .advantage-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 2rem;
  }

  .hero-visual {
    min-height: 460px;
    order: -1;
  }

  h1,
  h2 {
    max-width: none;
  }


}

@media (max-width: 760px) {
  .page-shell {
    width: min(calc(100% - 2rem), 1320px);
    padding-top: 0.5rem;
  }

  /* keep header single row — logo left, nav scrolls right */
  .site-header {
    padding: 0.6rem 0.5rem;
    gap: 0.5rem;
    border-radius: 1.5rem;
  }

  .site-header::before {
    border-radius: 1.5rem;
  }

  .brand-block {
    flex-shrink: 0;
  }

  .site-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    scrollbar-width: none;
    /* push nav to fill remaining space */
    flex: 1;
    min-width: 0;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .section-shell {
    padding: 3rem 0;
  }

  .hero-actions,
  .form-footer {
    align-items: stretch;
  }

  .button {
    width: 100%;
    font-size: 0.95rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    max-width: 200px;
    padding: 1rem;
  }

  .hero-card p,
  .hero-card span {
    font-size: 0.82rem;
  }

  .hero-card strong {
    font-size: 1.15rem;
  }

  .hero-card-primary {
    top: 10%;
    left: 4%;
  }

  .hero-card-secondary {
    bottom: 8%;
    right: 4%;
  }

  .hero-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .hero-visual {
    min-height: 260px;
  }

  .advantage-card,
  .project-content,
  .contact-panel,
  .contact-form {
    padding: 1.25rem;
  }

  .project-media {
    padding: 1rem;
    min-height: 220px;
  }

  .device-row {
    padding: 0.85rem 0.85rem 1rem;
    border-radius: 14px;
  }

  .device-row-label {
    font-size: 0.72rem;
  }

  .project-screenshots .screenshot {
    height: 200px;
  }

  .project-screenshots .screenshot.screenshot-ipad {
    height: 240px;
  }

  h3 {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .page-shell {
    width: min(calc(100% - 1.5rem), 1320px);
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 220px;
  }

  /* hide the decorative visual on very small phones to save space */
  .hero-orbit,
  .hero-grid {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    filter: none;
    transform: none;
  }
}
