/*
 * Jacobo Ortiz portfolio
 * Stripe-inspired principles: light typography, chromatic depth,
 * measured spacing, conservative radii, and one violet accent.
 */

:root {
  color-scheme: light;
  --page: #f6f9fc;
  --surface: #ffffff;
  --surface-subtle: #eef3f8;
  --surface-strong: #e6edf5;
  --ink: #061b31;
  --ink-soft: #273951;
  --muted: #5d6f84;
  --faint: #7c8da0;
  --border: #dbe5ef;
  --border-strong: #b9c9da;
  --accent: #533afd;
  --accent-hover: #4434d4;
  --button-accent: #533afd;
  --button-accent-hover: #4434d4;
  --accent-soft: #eeebff;
  --accent-ink: #2e2b8c;
  --ruby: #ea2261;
  --magenta: #f96bee;
  --cyan: #00b9f2;
  --success: #147d48;
  --error: #b4233b;
  --error-soft: #fff0f3;
  --shadow-1: 0 12px 28px rgba(50, 50, 93, 0.10), 0 3px 8px rgba(6, 27, 49, 0.06);
  --shadow-2: 0 30px 45px -30px rgba(50, 50, 93, 0.34), 0 18px 36px -18px rgba(6, 27, 49, 0.18);
  --shadow-3: 0 42px 80px -36px rgba(50, 50, 93, 0.44), 0 22px 44px -24px rgba(6, 27, 49, 0.24);
  --font-sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Source Code Pro", ui-monospace, SFMono-Regular, Consolas, monospace;
  --shell: 1160px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --header-height: 72px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --page: #0a1522;
  --surface: #0e1d2d;
  --surface-subtle: #13263a;
  --surface-strong: #183149;
  --ink: #f2f6fb;
  --ink-soft: #d4e0ec;
  --muted: #a7b6c7;
  --faint: #8193a7;
  --border: #203a53;
  --border-strong: #36536d;
  --accent: #8c7cff;
  --accent-hover: #a69aff;
  --button-accent: #6b54ff;
  --button-accent-hover: #5b45ea;
  --accent-soft: #211f4d;
  --accent-ink: #d7d2ff;
  --success: #72d7a2;
  --error: #ff8ba0;
  --error-soft: #391923;
  --shadow-1: 0 12px 28px rgba(0, 0, 0, 0.22), 0 3px 8px rgba(0, 0, 0, 0.18);
  --shadow-2: 0 30px 45px -30px rgba(0, 0, 0, 0.70), 0 18px 36px -18px rgba(0, 0, 0, 0.45);
  --shadow-3: 0 42px 80px -36px rgba(0, 0, 0, 0.78), 0 22px 44px -24px rgba(0, 0, 0, 0.52);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--page);
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

button {
  color: inherit;
}

::selection {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--surface);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(calc(100% - 48px), var(--shell));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: 112px 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 300;
  font-feature-settings: "ss01";
  text-wrap: balance;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(3rem, 5.2vw, 4.75rem);
  letter-spacing: -0.038em;
  line-height: 0.99;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  letter-spacing: -0.03em;
  line-height: 1.04;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(1.4rem, 2.1vw, 1.85rem);
  letter-spacing: -0.022em;
  line-height: 1.12;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Header */

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: var(--header-height);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 68%, transparent);
  background: color-mix(in srgb, var(--page) 86%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.nav-shell {
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.brand img {
  width: auto;
  height: 27px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.desktop-nav a {
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 180ms ease, color 180ms ease;
}

.desktop-nav a:hover {
  background: var(--surface-subtle);
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.theme-toggle-track {
  display: inline-flex;
  width: 32px;
  height: 18px;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-subtle);
}

.theme-toggle-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 180ms ease;
}

[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(14px);
}

.theme-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 120ms ease;
}

.button:active {
  transform: translateY(1px) scale(0.99);
}

.button-primary {
  background: var(--button-accent);
  color: #ffffff;
  box-shadow: 0 8px 18px -10px rgba(83, 58, 253, 0.7);
}

.button-primary:hover {
  background: var(--button-accent-hover);
  box-shadow: 0 14px 26px -12px rgba(83, 58, 253, 0.72);
}

.button-primary:disabled {
  cursor: wait;
  opacity: 0.68;
}

.button-secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--accent);
}

.button-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.menu-toggle {
  display: none;
  min-width: 54px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
}

.mobile-nav {
  display: none;
}

/* Hero */

.hero {
  position: relative;
  min-height: calc(100dvh - var(--header-height));
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 72px 0 80px;
}

.hero-atmosphere {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(55% 70% at 4% 2%, rgba(83, 58, 253, 0.18), transparent 62%),
    radial-gradient(40% 55% at 95% 18%, rgba(249, 107, 238, 0.16), transparent 68%),
    radial-gradient(36% 46% at 76% 94%, rgba(0, 185, 242, 0.12), transparent 66%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, transparent), transparent 78%);
}

[data-theme="dark"] .hero-atmosphere {
  background:
    radial-gradient(55% 70% at 4% 2%, rgba(140, 124, 255, 0.20), transparent 62%),
    radial-gradient(40% 55% at 95% 18%, rgba(249, 107, 238, 0.13), transparent 68%),
    radial-gradient(36% 46% at 76% 94%, rgba(0, 185, 242, 0.10), transparent 66%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.96fr);
  align-items: center;
  gap: clamp(54px, 8vw, 112px);
}

.hero-copy {
  max-width: 660px;
}

.hero-kicker {
  margin-bottom: 19px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-lede {
  max-width: 535px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.23rem);
  font-weight: 300;
  line-height: 1.5;
}

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

.hero-portrait {
  position: relative;
  width: min(100%, 480px);
  justify-self: end;
  padding: 28px 30px 34px;
}

.portrait-plane {
  position: absolute;
  border-radius: var(--radius-lg);
  pointer-events: none;
}

.portrait-plane-one {
  inset: 10% 2% 2% 12%;
  background: linear-gradient(145deg, rgba(83, 58, 253, 0.94), rgba(234, 34, 97, 0.76) 52%, rgba(0, 185, 242, 0.68));
  transform: rotate(6deg);
  box-shadow: var(--shadow-3);
}

.portrait-plane-two {
  inset: 3% 9% 9% 3%;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  transform: rotate(-5deg);
}

.portrait-card {
  position: relative;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-3);
}

.portrait-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.portrait-card figcaption {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.portrait-card figcaption span:first-child {
  color: var(--ink);
  font-weight: 500;
}

.portrait-card figcaption span:last-child {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
  text-align: right;
}

/* Proof band */

.proof-band {
  border-block: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 74%, var(--page));
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.proof-grid p {
  margin: 0;
  padding: 22px 14px;
  border-right: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 500;
  text-align: center;
}

.proof-grid p:first-child {
  border-left: 1px solid var(--border);
}

/* Shared headings */

.section-heading {
  max-width: 700px;
  margin-bottom: 56px;
}

.section-heading > p:not(.section-index) {
  max-width: 580px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 300;
}

.section-index,
.project-number {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  color: var(--accent);
  font-weight: 500;
  line-height: 1.6;
  transition: border-color 180ms ease, color 180ms ease;
}

.text-link:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

/* About */

.about {
  background: var(--surface);
}

.about-layout {
  display: grid;
  grid-template-columns: 0.76fr 1.24fr;
  gap: clamp(56px, 10vw, 140px);
  align-items: start;
}

.about-heading {
  position: sticky;
  top: calc(var(--header-height) + 40px);
}

.about-copy {
  max-width: 690px;
}

.about-copy p {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 1.04rem;
}

.about-copy .lead-copy {
  margin-bottom: 26px;
  color: var(--ink);
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.about-copy .text-link {
  margin-top: 10px;
}

/* Expertise */

.expertise {
  background: var(--page);
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.expertise-card {
  position: relative;
  min-height: 278px;
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.expertise-card p {
  max-width: 56ch;
  margin-bottom: 0;
  color: var(--muted);
}

.expertise-card h3 {
  max-width: 480px;
}

.card-label {
  margin-bottom: 30px !important;
  color: var(--accent) !important;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.expertise-primary {
  grid-column: span 7;
  min-height: 425px;
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    linear-gradient(155deg, color-mix(in srgb, var(--surface) 95%, transparent), color-mix(in srgb, var(--accent-soft) 50%, var(--surface)));
}

.expertise-primary > div:first-child {
  position: relative;
  z-index: 2;
}

.expertise-primary h3 {
  max-width: 440px;
}

.expertise-wordpress {
  grid-column: span 5;
  min-height: 425px;
}

.expertise-systems {
  grid-column: span 5;
  background: #171a46;
}

.expertise-systems h3,
.expertise-systems .card-label {
  color: #ffffff !important;
}

.expertise-systems p {
  color: #bbc4dc;
}

.expertise-performance {
  grid-column: span 3;
  background: linear-gradient(145deg, #fff0f7, #ecebff);
}

[data-theme="dark"] .expertise-performance {
  background: linear-gradient(145deg, #311b35, #202050);
}

.expertise-performance .metric {
  margin-bottom: 62px;
  color: var(--ruby);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
}

.expertise-operations {
  grid-column: span 4;
  background:
    radial-gradient(circle at 82% 16%, rgba(0, 185, 242, 0.17), transparent 38%),
    var(--surface);
}

.compact-list,
.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.compact-list li,
.tech-list li {
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
}

.signal-map {
  position: absolute;
  right: 24px;
  bottom: 18px;
  left: 24px;
  height: 150px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
  border-radius: var(--radius-md);
  background:
    linear-gradient(color-mix(in srgb, var(--accent) 8%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 8%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
}

.signal-line {
  position: absolute;
  height: 2px;
  border-radius: 2px;
  transform-origin: left center;
}

.signal-a {
  width: 48%;
  top: 67%;
  left: 7%;
  background: var(--accent);
  transform: rotate(-15deg);
}

.signal-b {
  width: 38%;
  top: 46%;
  left: 48%;
  background: var(--ruby);
  transform: rotate(12deg);
}

.signal-c {
  width: 30%;
  top: 72%;
  left: 61%;
  background: var(--cyan);
  transform: rotate(-29deg);
}

.signal-node {
  position: absolute;
  width: 11px;
  height: 11px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 0 0 2px currentColor;
}

.node-a { top: 61%; left: 44%; color: var(--accent); background: var(--accent); }
.node-b { top: 54%; left: 70%; color: var(--ruby); background: var(--ruby); }
.node-c { top: 28%; left: 86%; color: var(--cyan); background: var(--cyan); }

.systems-flow {
  position: absolute;
  right: 24px;
  bottom: 26px;
  left: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.systems-flow span {
  display: grid;
  width: 64px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.67rem;
}

.systems-flow i {
  flex: 1;
  height: 1px;
  margin: 0 10px;
  background: linear-gradient(90deg, rgba(255,255,255,.18), #8c7cff, rgba(255,255,255,.18));
}

/* Projects */

.projects {
  background: var(--surface);
}

.project-list {
  display: grid;
  gap: 84px;
}

.project-row {
  display: grid;
  grid-template-columns: 1.07fr 0.93fr;
  align-items: center;
  gap: clamp(44px, 7vw, 96px);
}

.project-row-reverse .project-visual {
  order: 2;
}

.project-row-reverse .project-copy {
  order: 1;
}

.project-visual {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
}

.visual-word {
  position: relative;
  z-index: 2;
  color: #ffffff;
  font-size: clamp(3.1rem, 7vw, 6.3rem);
  font-weight: 300;
  letter-spacing: -0.055em;
  line-height: 1;
}

.visual-angular {
  background:
    radial-gradient(circle at 24% 22%, rgba(249,107,238,.76), transparent 30%),
    radial-gradient(circle at 78% 72%, rgba(0,185,242,.7), transparent 30%),
    linear-gradient(135deg, #3b2dce, #6b3df4 46%, #261d72);
}

.visual-orbit {
  position: absolute;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 50%;
}

.orbit-one { width: 380px; height: 130px; transform: rotate(32deg); }
.orbit-two { width: 420px; height: 160px; transform: rotate(-27deg); }

.visual-wordpress {
  background: linear-gradient(150deg, #061b31, #1c3f69 60%, #2874ad);
}

.visual-window {
  position: absolute;
  width: 35%;
  height: 32%;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.08);
  box-shadow: 0 18px 38px rgba(0,0,0,.2);
}

.window-one { top: 10%; left: 8%; transform: rotate(-8deg); }
.window-two { right: 8%; bottom: 9%; transform: rotate(7deg); }
.window-three { right: 10%; top: 8%; width: 22%; height: 22%; transform: rotate(4deg); }

.visual-learning {
  background: linear-gradient(145deg, #e33c76, #8a42e8 55%, #41289f);
}

.learning-ring {
  position: absolute;
  border: 1px solid rgba(255,255,255,.36);
  border-radius: 50%;
}

.ring-one { width: 420px; height: 420px; }
.ring-two { width: 300px; height: 300px; }
.ring-three { width: 185px; height: 185px; background: rgba(255,255,255,.06); }

.visual-commerce {
  background: linear-gradient(140deg, #012c42, #006b83 52%, #00a5c6);
}

.commerce-card {
  position: absolute;
  width: 27%;
  aspect-ratio: 0.72;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255,255,255,.24), rgba(255,255,255,.06));
  box-shadow: 0 24px 45px rgba(0,0,0,.22);
}

.commerce-one { left: 10%; transform: rotate(-14deg); }
.commerce-two { right: 10%; transform: rotate(14deg); }
.commerce-three { left: 36.5%; transform: translateY(-12px); }

.project-copy {
  max-width: 465px;
}

.project-copy > p:not(.project-number) {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 1.03rem;
}

.project-number {
  margin-bottom: 28px;
}

.project-copy .tech-list {
  margin-top: 0;
}

/* Experience */

.experience {
  background: var(--page);
}

.experience-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.76fr) minmax(0, 1.24fr);
  gap: clamp(56px, 9vw, 128px);
  align-items: start;
}

.experience-intro {
  position: sticky;
  top: calc(var(--header-height) + 40px);
}

.experience-intro > p:not(.section-index) {
  max-width: 440px;
  margin-bottom: 24px;
  color: var(--muted);
}

.experience-list {
  border-top: 1px solid var(--border-strong);
}

.experience-item {
  border-bottom: 1px solid var(--border);
}

.experience-item h3 {
  margin: 0;
}

.experience-item button {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(135px, 0.9fr) minmax(170px, 1.25fr) auto 18px;
  align-items: center;
  gap: 22px;
  padding: 24px 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.experience-company {
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 500;
}

.experience-role,
.experience-period {
  color: var(--muted);
  font-size: 0.88rem;
}

.experience-period {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  white-space: nowrap;
}

.experience-symbol {
  position: relative;
  width: 16px;
  height: 16px;
}

.experience-symbol::before,
.experience-symbol::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 2px;
  width: 12px;
  height: 1px;
  background: var(--accent);
  transition: transform 180ms ease;
}

.experience-symbol::after {
  transform: rotate(90deg);
}

.experience-item.is-open .experience-symbol::after {
  transform: rotate(0);
}

.experience-panel {
  padding: 0 44px 26px 0;
}

.experience-panel p {
  max-width: 590px;
  margin: 0;
  color: var(--muted);
}

/* Testimonials */

.testimonials {
  background: var(--surface);
}

.testimonials .section-heading {
  max-width: 760px;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: 1.34fr 0.66fr;
  gap: 16px;
}

.testimonial-stack {
  display: grid;
  gap: 16px;
}

.testimonial {
  margin: 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--page);
}

.testimonial-featured {
  min-height: 424px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 5vw, 58px);
  background:
    radial-gradient(circle at 88% 8%, rgba(249,107,238,.18), transparent 28%),
    linear-gradient(145deg, var(--accent-soft), var(--surface));
}

.testimonial blockquote {
  margin: 0 0 34px;
  color: var(--ink);
  font-size: 1.14rem;
  font-weight: 300;
  line-height: 1.45;
}

.testimonial-featured blockquote {
  max-width: 670px;
  font-size: clamp(1.9rem, 3.3vw, 2.65rem);
  letter-spacing: -0.025em;
  line-height: 1.16;
}

.testimonial figcaption {
  display: grid;
  gap: 3px;
}

.testimonial figcaption span:first-child {
  color: var(--ink);
  font-weight: 500;
}

.testimonial figcaption span:last-child {
  color: var(--muted);
  font-size: 0.82rem;
}

/* Contact */

.contact {
  overflow: hidden;
  background: var(--page);
}

.contact-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(44% 72% at 2% 50%, rgba(83,58,253,.12), transparent 68%),
    radial-gradient(38% 68% at 100% 85%, rgba(249,107,238,.11), transparent 68%);
}

.contact-layout {
  position: relative;
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(56px, 9vw, 124px);
  align-items: start;
}

.contact-copy {
  padding-top: 12px;
}

.contact-copy > p {
  max-width: 480px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.06rem;
}

.contact-links {
  display: grid;
  justify-items: start;
  gap: 12px;
}

.contact-links a {
  border-bottom: 1px solid transparent;
  color: var(--accent);
  font-weight: 500;
  transition: border-color 180ms ease;
}

.contact-links a:hover {
  border-color: var(--accent);
}

.contact-form {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.96rem;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.field input {
  min-height: 48px;
  padding: 10px 12px;
}

.field textarea {
  min-height: 146px;
  padding: 12px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--faint);
  opacity: 1;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.field.has-error input,
.field.has-error textarea {
  border-color: var(--error);
  background: var(--error-soft);
}

.field-error {
  display: none;
  margin: 6px 0 0;
  color: var(--error);
  font-size: 0.79rem;
}

.field.has-error .field-error {
  display: block;
}

.form-footer {
  display: flex;
  align-items: center;
  gap: 18px;
}

.form-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.form-status.is-success {
  color: var(--success);
}

.form-status.is-error {
  color: var(--error);
}

/* Footer */

.site-footer {
  padding: 34px 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-layout {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}

.footer-brand img {
  height: 22px;
}

.footer-layout p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Responsive */

@media (max-width: 1024px) {
  .desktop-nav {
    gap: 2px;
  }

  .desktop-nav a {
    padding-inline: 7px;
  }

  .theme-label {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: 1fr 0.82fr;
    gap: 48px;
  }

  .hero-portrait {
    padding-inline: 12px;
  }

  .expertise-primary,
  .expertise-wordpress {
    grid-column: span 6;
  }

  .expertise-systems {
    grid-column: span 6;
  }

  .expertise-performance,
  .expertise-operations {
    grid-column: span 3;
  }

  .experience-layout {
    grid-template-columns: 0.72fr 1.28fr;
    gap: 56px;
  }

  .experience-item button {
    grid-template-columns: minmax(115px, 0.8fr) minmax(150px, 1.2fr) auto 18px;
    gap: 14px;
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 66px;
  }

  .shell {
    width: min(calc(100% - 36px), var(--shell));
  }

  .section {
    padding: 84px 0;
  }

  .desktop-nav,
  .nav-contact {
    display: none;
  }

  .nav-actions {
    margin-left: auto;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .mobile-nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    max-height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    display: grid;
    padding: 16px 18px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  }

  .mobile-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .mobile-nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-bottom: 1px solid var(--border);
    color: var(--ink);
    font-size: 1.02rem;
  }

  .hero {
    padding: 58px 0 72px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .hero-copy {
    max-width: 690px;
  }

  .hero-portrait {
    width: min(100%, 520px);
    justify-self: start;
  }

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

  .proof-grid p:first-child {
    border-left: 0;
  }

  .proof-grid p:nth-child(3) {
    border-right: 0;
  }

  .proof-grid p:nth-child(n+4) {
    border-top: 1px solid var(--border);
  }

  .proof-grid p:last-child {
    grid-column: span 2;
    border-right: 0;
  }

  .about-layout,
  .experience-layout,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-heading,
  .experience-intro {
    position: static;
  }

  .expertise-primary,
  .expertise-wordpress,
  .expertise-systems,
  .expertise-performance,
  .expertise-operations {
    grid-column: span 6;
  }

  .expertise-primary,
  .expertise-wordpress {
    min-height: 380px;
  }

  .project-row,
  .project-row-reverse {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .project-row-reverse .project-visual,
  .project-row-reverse .project-copy {
    order: initial;
  }

  .project-copy {
    max-width: 640px;
  }

  .project-visual {
    min-height: 350px;
  }

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

  .testimonial-featured {
    min-height: 360px;
  }

  .footer-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

@media (max-width: 600px) {
  .shell {
    width: min(calc(100% - 28px), var(--shell));
  }

  .section {
    padding: 70px 0;
  }

  h1 {
    font-size: clamp(2.65rem, 14vw, 3.55rem);
    line-height: 1.01;
  }

  h2 {
    font-size: clamp(2.05rem, 10vw, 2.85rem);
  }

  .brand img {
    height: 23px;
  }

  .theme-toggle {
    padding-inline: 4px;
  }

  .hero {
    padding-top: 48px;
  }

  .hero-kicker {
    margin-bottom: 16px;
    font-size: 0.7rem;
  }

  .hero-actions {
    align-items: stretch;
  }

  .hero-actions .button {
    flex: 1 1 100%;
  }

  .hero-portrait {
    padding: 14px 10px 20px;
  }

  .portrait-card figcaption {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .portrait-card figcaption span:last-child {
    text-align: left;
  }

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

  .proof-grid p,
  .proof-grid p:first-child,
  .proof-grid p:nth-child(3),
  .proof-grid p:last-child {
    grid-column: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .proof-grid p:last-child {
    border-bottom: 0;
  }

  .section-heading {
    margin-bottom: 40px;
  }

  .about-layout,
  .experience-layout,
  .contact-layout {
    gap: 36px;
  }

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

  .expertise-primary,
  .expertise-wordpress,
  .expertise-systems,
  .expertise-performance,
  .expertise-operations {
    grid-column: auto;
    min-height: 300px;
  }

  .expertise-primary {
    min-height: 405px;
  }

  .expertise-systems {
    min-height: 340px;
  }

  .signal-map {
    height: 125px;
  }

  .project-list {
    gap: 64px;
  }

  .project-visual {
    min-height: 278px;
  }

  .visual-word {
    font-size: clamp(3.2rem, 18vw, 5.4rem);
  }

  .experience-item button {
    grid-template-columns: 1fr auto;
    gap: 5px 14px;
    padding: 22px 0;
  }

  .experience-company,
  .experience-role,
  .experience-period {
    grid-column: 1;
  }

  .experience-symbol {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .experience-panel {
    padding-right: 16px;
  }

  .testimonial,
  .testimonial-featured {
    padding: 25px;
  }

  .testimonial-featured {
    min-height: 320px;
  }

  .contact-form {
    padding: 22px;
  }

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

  .form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .form-footer .button {
    width: 100%;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--page);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
