/* ==========================================================================
   Maria Gopez: style.css
   Layout concept: a bright, airy page with bold, open-spaced headings,
   one desk scene where Maria's skills come out of her laptop, then calm
   sections divided by hairlines.
   Palette: charcoal ink #292937, steel blue #507593, brick #884639 and maroon #800000
   on a warm off-white.
   To change a colour or font, edit the tokens below.
   ========================================================================== */

:root {
  /* Colour: warm off-white base, charcoal ink, steel blue actions, brick + maroon accents */
  --porcelain: #F7F4F1;   /* warm off-white: page background and whitespace */
  --surface:   #FFFFFF;   /* white: cards, form panel */
  --surface-2: #EFEAE5;
  --wall:      #EEE8E3;
  --ink:       #292937;   /* charcoal ink: headings, navigation, footer */
  --ink-hover: #3A3A4F;
  --midnight:  #1B1B26;   /* darkest ink for video and footer edges */
  --ink-2:     #507593;
  --cobalt:    #507593;   /* steel blue: buttons and links */
  --cobalt-hover: #3E5D76;
  --text:      #3A3946;   /* body text */
  --muted:     #67636F;
  --clay:      #884639;   /* brick: highlights and lines */
  --clay-deep: #800000;   /* maroon: accent words and small text */
  --rose-tint: #F5E9E5;   /* soft brick tint */
  --sage:      #B9CAD7;   /* light steel blue */
  --sage-deep: #3E5D76;   /* deep steel blue: small blue text */
  --sage-tint: #E6ECF1;   /* steel tint */
  --lilac:     #7E9AB1;   /* soft steel blue */
  --lilac-tint:#E4EAEF;   /* pale steel tint */
  --warm-deep: #884639;
  --line:      #E4DDD7;
  --line-strong: #CEC5BE;
  --tint-a: var(--rose-tint);
  --tint-b: var(--sage-tint);
  --tint-c: var(--lilac-tint);

  /* Type: two clean families */
  --f-display: "Plus Jakarta Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body:    "Plus Jakarta Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-accent: var(--f-display);
  --f-script:  var(--f-accent);

  /* Space & shape */
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --max: 1320px;
  --section: clamp(84px, 11vw, 156px);
  --section-y: clamp(72px, 9vw, 128px); /* one spacing rhythm for every main section */
  --radius-lg: 26px;
  --radius-md: 18px;
  --ease: cubic-bezier(.22, 1, .36, 1);

  /* MG logo: dark blue M, sage green G */
  --mg-m: #24405A;
  --mg-g: #7F9C78;

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
html:not(.lenis) { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--porcelain);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* paints the phone's top safe-area band behind the sticky header */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; z-index: 60;
  height: env(safe-area-inset-top, 0px); background: var(--porcelain);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--rose-tint); color: var(--ink); }

.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

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

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--porcelain); padding: 10px 16px; border-radius: 10px; text-decoration: none; }
.skip-link:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 64px);
  margin-inline: auto;
  padding-left: max(var(--gutter), 3.2vw);
  padding-right: max(var(--gutter-r), 3.2vw);
}
@media (min-width: 1500px) { .wrap { padding-left: 32px; padding-right: 32px; } }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--clay-deep);
}
.eyebrow span { color: var(--sage); margin-inline: .35em; }
em { font-style: normal; color: var(--clay-deep); }

.section-head { display: grid; gap: 18px; max-width: 900px; margin-bottom: clamp(44px, 6vw, 80px); }
.section-head-split { max-width: none; grid-template-columns: 1.15fr 1fr; align-items: end; column-gap: clamp(32px, 6vw, 96px); }
.section-head-split .section-title { margin-top: 18px; }
.section-title {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(2.4rem, 5.2vw, 4.6rem); line-height: 1.06; letter-spacing: -.005em;
}
.section-lead { font-size: clamp(1.05rem, 1.3vw, 1.2rem); max-width: 58ch; color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: .9rem 1.45rem;
  border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 1rem; line-height: 1.1; text-decoration: none; cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn .icon { transition: transform .35s var(--ease); }
.btn:hover .icon { transform: translateX(4px); }
.btn-primary { background: var(--cobalt); color: #FFFFFF; }
.btn-primary:hover { background: var(--cobalt-hover); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--porcelain); }
.btn-outline:hover .icon { transform: translate(2px, -2px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--porcelain);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner {
  display: flex; align-items: center; gap: 28px;
  max-width: calc(var(--max) + 64px); margin-inline: auto;
  padding-block: 14px;
  padding-left: max(var(--gutter), 3.2vw); padding-right: max(var(--gutter-r), 3.2vw);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-family: var(--f-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -.005em; color: var(--ink);
  margin-right: auto;
}
.mg-mark { width: 34px; height: 34px; color: var(--ink); flex: none; }
.main-nav { display: flex; gap: 30px; }
.main-nav a {
  text-decoration: none; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  position: relative; padding-block: 6px;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--clay);
  transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.main-nav a:hover::after, .main-nav a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }
.header-cta { min-height: 44px; padding: .6rem 1.15rem; font-size: .92rem; }
.menu-toggle { display: none; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding-block: clamp(28px, 4vw, 56px) clamp(64px, 8vw, 110px); }
.hero-intro {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: end; column-gap: clamp(28px, 5vw, 80px); row-gap: 24px;
  margin-bottom: clamp(26px, 3.6vw, 48px);
}
.hero-role { margin-top: 20px; font-size: clamp(1rem, 1.2vw, 1.12rem); font-weight: 700; color: var(--clay-deep); }
.hero-title {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(2.7rem, 6vw, 6rem); line-height: 1.02; letter-spacing: -.005em;
}
.hero-side { display: grid; gap: 26px; padding-bottom: .6em; min-width: 0; }
.lead { font-size: clamp(1.08rem, 1.35vw, 1.25rem); color: var(--text); max-width: 42ch; }

/* --- Skills scene: Maria's video (seen from behind) on the left; each skill comes out of her laptop screen --- */
.skills-scroll { position: relative; }
.skills-pin { position: relative; }
.skills-scroll.is-pinned .skills-pin {
  position: sticky; top: var(--header-h, 72px);
  height: calc(100svh - var(--header-h, 72px));
  display: flex; align-items: center; align-items: safe center;
  padding-block: 12px;
}
.skills-scroll.is-pinned .skills-pin > .wrap { width: 100%; }
.skills {
  position: relative;
  display: grid; gap: clamp(14px, 2vh, 22px);
  padding: clamp(16px, 2.2vw, 30px);
  border-radius: 28px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 30px 60px -50px rgba(41, 41, 55, .45);
}
.skills-stage {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: clamp(18px, 2.6vw, 40px); align-items: center;
  outline: none; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.skills-stage:focus-visible { box-shadow: 0 0 0 3px var(--cobalt); border-radius: 20px; }
.skills-film {
  position: relative; width: min(100%, calc((100svh - var(--header-h, 72px) - 180px) * 16 / 9));
  aspect-ratio: 16 / 9; max-width: 100%; justify-self: start;
  border-radius: 20px; overflow: hidden; background: var(--midnight);
}
.skills-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen-glow {
  position: absolute; left: var(--sx, 31%); top: var(--sy, 67%); width: 34%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; pointer-events: none;
  background: rgba(255, 255, 255, .8); filter: blur(14px); scale: .62;
  opacity: calc(var(--burst, 0) * .8); mix-blend-mode: screen;
}

.skills-side { display: grid; gap: 16px; align-content: center; min-width: 0; }
.skill-slot { position: relative; height: clamp(280px, 44vh, 400px); z-index: 5; }
.skill-card {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
  padding: clamp(22px, 2.4vw, 36px);
  border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 26px 50px -30px rgba(41, 41, 55, .5);
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  --tone-bg: var(--tint-a); --tone-fg: var(--clay-deep);
}
.skills-scroll:not(.is-pinned) .skill-card { transition: transform .7s var(--ease), opacity .5s var(--ease); }
.tone-b { --tone-bg: var(--tint-b); --tone-fg: var(--sage-deep); }
.tone-c { --tone-bg: var(--tint-c); --tone-fg: var(--warm-deep); }
.skill-card:not(.is-active) { pointer-events: none; }
.skill-num { font-family: var(--f-display); font-weight: 800; font-size: 1rem; letter-spacing: .08em; line-height: 1; color: var(--tone-fg); }
.skill-area { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tone-fg); margin-top: 4px; }
.skill-name { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.55rem, 2.5vw, 2.4rem); line-height: 1.12; }
.skill-desc { color: var(--text); font-size: clamp(1rem, 1.2vw, 1.15rem); max-width: 34ch; }

.skills-tabs { display: grid; gap: 2px; counter-reset: none; }
.skill-tab {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 7px 12px; border-radius: 10px; cursor: pointer;
  border: 0; background: transparent; color: var(--muted); text-align: left;
  font-weight: 600; font-size: .9rem; transition: background-color .25s, color .25s;
  position: relative;
}
.skill-tab::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--clay); transform: scaleY(0); transition: transform .3s var(--ease); }
.skill-tab:hover { background: var(--surface-2); color: var(--ink); }
.skill-tab .tab-num { font-variant-numeric: tabular-nums; font-size: .76rem; font-weight: 700; color: var(--line-strong); min-width: 2ch; }
.skill-tab.is-done { color: var(--ink); }
.skill-tab.is-done .tab-num { color: var(--muted); }
.skill-tab[aria-current="true"] { color: var(--ink); background: var(--tint-a); }
.skill-tab[aria-current="true"]::before { transform: scaleY(1); }
.skill-tab[aria-current="true"] .tab-num { color: var(--clay-deep); }

.skills-controls { display: flex; align-items: center; gap: 14px; position: relative; z-index: 2; }
.skills-arrow {
  width: 50px; height: 50px; flex: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  transition: background-color .25s, color .25s, transform .2s;
}
.skills-arrow:hover { background: var(--ink); color: var(--porcelain); }
.skills-arrow:active { transform: scale(.94); }
.icon.flip { transform: scaleX(-1); }
.skills-count { font-family: var(--f-display); font-weight: 800; color: var(--ink); font-size: 1.15rem; font-variant-numeric: tabular-nums; min-width: 4.6ch; }
.skills-count .of { color: var(--muted); font-weight: 600; }
.skills-progress { flex: 1; height: 2px; background: rgba(41, 41, 55, .14); border-radius: 2px; overflow: hidden; min-width: 40px; }
.skills-progress span { display: block; height: 100%; width: 100%; background: var(--clay); transform-origin: left; transform: scaleX(.143); }

/* ==========================================================================
   Facts
   ========================================================================== */
.facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(56px, 7vw, 96px);
}
.fact { border-top: 1.5px solid var(--ink); padding-top: 20px; display: grid; gap: 10px; align-content: start; }
.fact-title { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.25rem, 1.7vw, 1.55rem); letter-spacing: -.005em; line-height: 1.15; }
.fact p { color: var(--text); max-width: 40ch; }

/* ==========================================================================
   Services
   ========================================================================== */
.services { padding-block: var(--section-y); }
.pillars { position: relative; }
.pillar-line {
  position: absolute; left: 12px; top: 40px; bottom: 40px; width: 40px; height: calc(100% - 80px);
  overflow: visible; pointer-events: none;
}
.pillar-line path { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.pillar-line-track { stroke: var(--line); }
.pillar-line-draw { stroke: var(--clay); stroke-dasharray: 1; stroke-dashoffset: 0; stroke-linecap: round; }

.pillar {
  position: relative;
  display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.1fr);
  column-gap: clamp(22px, 3.4vw, 56px); row-gap: 20px; align-items: start;
  padding-block: clamp(36px, 4.5vw, 60px);
  border-top: 1px solid var(--line);
}
.pillar:last-child { border-bottom: 1px solid var(--line); }
.pillar-mark {
  position: relative; z-index: 1; justify-self: center; padding: .55em 6px 8px;
  font-family: var(--f-display); font-weight: 800; font-size: 1.1rem; letter-spacing: .06em;
  line-height: 1; color: var(--clay-deep); background: var(--porcelain);
}
.pillar-body { display: grid; gap: 14px; min-width: 0; }
.pillar-title { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.7rem, 2.8vw, 2.5rem); line-height: 1.1; letter-spacing: -.005em; }
.amp { color: var(--clay-deep); }
.pillar-value { font-size: clamp(1.08rem, 1.3vw, 1.2rem); color: var(--text); max-width: 34ch; }
.pillar-detail { display: grid; gap: 20px; min-width: 0; }
.checks { display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: .62em; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--clay); background: var(--porcelain);
}
.checks strong { color: var(--ink); font-weight: 700; }
.good-for { font-size: .95rem; color: var(--muted); }
.good-for span { font-weight: 700; color: var(--clay-deep); margin-right: 4px; }

/* ==========================================================================
   Process
   ========================================================================== */
.process { padding-block: var(--section-y); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); counter-reset: s; }
.step { display: grid; gap: 12px; align-content: start; padding-top: 26px; border-top: 1px solid var(--line); }
.step-num { font-family: var(--f-display); font-weight: 800; font-size: 1.1rem; letter-spacing: .06em; line-height: 1; color: var(--clay-deep); }
.step h3 { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.35rem, 1.9vw, 1.75rem); letter-spacing: -.005em; }
.steps-progress { height: 2px; background: var(--line); margin-top: 36px; border-radius: 2px; overflow: hidden; }
.steps-progress span { display: block; height: 100%; background: var(--clay); transform-origin: left; transform: scaleX(1); }

/* ==========================================================================
   Work
   ========================================================================== */
.work { padding-block: var(--section-y); background: var(--lilac-tint); }

/* "Browser" frame that holds the project windows */
.work-stage {
  border-radius: 28px; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 50px 90px -60px rgba(41, 41, 55, .55);
}
.browser-bar {
  display: flex; align-items: center; gap: 16px; padding: 14px 20px;
  border-bottom: 1px solid var(--line); background: var(--porcelain);
}
.dots { display: inline-flex; gap: 6px; flex: none; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #D9A396; }
.dots i:nth-child(2) { background: var(--lilac); }
.dots i:nth-child(3) { background: var(--sage); }
.browser-url {
  font-size: .8rem; font-weight: 600; color: var(--muted); padding: 5px 14px; border-radius: 999px;
  background: var(--porcelain); border: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.browser-hint { margin-left: auto; font-size: .85rem; font-weight: 700; color: var(--clay-deep); white-space: nowrap; }

.work-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px);
  padding: clamp(18px, 2.6vw, 34px);
}

/* Each project is a small browser window */
.work-card {
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 26px 50px -36px rgba(41, 41, 55, .55);
  transition: box-shadow .35s var(--ease);
}
.work-card:hover { box-shadow: 0 34px 60px -34px rgba(41, 41, 55, .6); }
.work-open {
  all: unset; box-sizing: border-box; cursor: pointer; display: grid; width: 100%;
  border-radius: 18px; overflow: hidden;
}
.work-open:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 4px; }
a.work-open { color: inherit; text-decoration: none; }
.work-details {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 18px 16px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: .82rem; font-weight: 600;
  transition: border-color .2s, color .2s;
}
.work-details:hover { border-color: var(--ink); color: var(--ink); }
.work-details:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
@keyframes float-card { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9px; } }
html.js-motion .work-stage:not(.is-physics) .work-card.is-in { animation: float-card 6s ease-in-out infinite; }
html.js-motion .work-stage:not(.is-physics) .work-card.is-in:nth-child(2) { animation-duration: 7s; animation-delay: -2s; }
html.js-motion .work-stage:not(.is-physics) .work-card.is-in:nth-child(3) { animation-duration: 6.5s; animation-delay: -4s; }
html.js-motion .work-stage:not(.is-physics) .work-card.is-in:nth-child(4) { animation-duration: 7.5s; animation-delay: -1s; }
.card-chrome {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: var(--porcelain); border-bottom: 1px solid var(--line);
}
.card-chrome .dots i { width: 9px; height: 9px; }
.card-url { font-size: .74rem; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.work-media { display: block; overflow: hidden; aspect-ratio: 16 / 10; max-width: 100%; background: var(--porcelain); }
.work-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .9s var(--ease); pointer-events: none; }
.work-open:hover .work-media img { transform: scale(1.04); }
.work-info { display: grid; gap: 8px; justify-items: start; padding: 18px 18px 20px; }
.work-title { font-family: var(--f-display); font-weight: 800; color: var(--ink); font-size: clamp(1.35rem, 1.9vw, 1.75rem); letter-spacing: -.005em; line-height: 1.05; }
.work-desc { color: var(--text); font-size: .98rem; max-width: 46ch; }
.work-tags { font-size: .84rem; color: var(--muted); }
.work-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); margin-top: 4px; }
.work-more .icon { transition: transform .35s var(--ease); }
.work-open:hover .work-more .icon { transform: translateX(4px); }

/* Playground mode (desktop + mouse): windows can be dragged and thrown */
.work-stage.is-physics .work-grid { display: block; position: relative; height: clamp(560px, 44vw, 640px); padding: 0; }
.work-stage.is-physics .work-card {
  position: absolute; left: 0; top: 0; width: clamp(290px, 26vw, 360px);
  touch-action: none; user-select: none; -webkit-user-select: none; will-change: transform;
}
.work-stage.is-physics .work-open { cursor: grab; }
.work-stage.is-physics .work-card.is-dragging { z-index: 5; box-shadow: 0 50px 80px -40px rgba(41, 41, 55, .7); }
.work-stage.is-physics .work-card.is-dragging .work-open { cursor: grabbing; }
.work-stage.is-physics .work-tags, .work-stage.is-physics .work-desc { display: none; }
.work-stage:not(.is-physics) .browser-hint { display: none; }
@media (max-width: 1024px) {
  .work-stage.is-physics .work-card { width: clamp(240px, 34vw, 320px); }
  .work-stage.is-physics .work-grid { height: clamp(560px, 70vw, 680px); }
}
/* Phones: windows swing in as you scroll (values set in script.js 10b) */
html.js-motion .work-stage:not(.is-physics) .work-card {
  transform: translateX(var(--sway-x, 0)) rotate(var(--sway-r, 0deg)) scale(var(--sway-s, 1));
  transition: opacity .9s var(--ease), box-shadow .35s var(--ease), transform .25s linear;
}
.work-open:active .work-media img { transform: scale(1.04); }
.work-stage:not(.is-physics) .work-card:active { box-shadow: 0 34px 60px -34px rgba(41, 41, 55, .6); }

/* ==========================================================================
   Why
   ========================================================================== */
.why { padding-block: var(--section-y); }
.why-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(40px, 7vw, 110px); align-items: center; }
.why-photo { margin: 0 22px 22px 0; position: relative; max-width: 460px; justify-self: center; width: calc(100% - 22px); }
.why-photo::before {
  content: ""; position: absolute; inset: 0; translate: 22px 22px;
  border-radius: 999px 999px 26px 26px; background: var(--sage-tint);
}
.arch-frame { position: relative; overflow: hidden; border-radius: 999px 999px 26px 26px; aspect-ratio: 3 / 4; max-width: 100%; background: var(--sage-tint); }
.arch-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.why-copy { display: grid; gap: 22px; min-width: 0; }
.why-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; margin-top: 18px; max-width: 60ch; }
.why-list li { border-top: 1px solid var(--line); padding-top: 18px; }
.why-list h3 { font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -.005em; margin-bottom: 4px; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { padding-block: var(--section-y); background: var(--rose-tint); position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; right: -8vw; top: -10vw; width: 44vw; height: 60vw; max-width: 640px; max-height: 860px;
  border-radius: 999px 999px 0 0; background: var(--surface); opacity: .55; pointer-events: none;
}
.contact-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-copy { display: grid; gap: 22px; min-width: 0; }
.contact-title { font-family: var(--f-display); font-weight: 800; font-size: clamp(3.6rem, 9vw, 8rem); line-height: .98; letter-spacing: -.005em; }
.contact-list { display: grid; gap: 4px; }
.contact-list li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding-block: 14px; border-top: 1px solid rgba(41, 41, 55, .14);
}
.contact-list li:last-child { border-bottom: 1px solid rgba(41, 41, 55, .14); }
.contact-list div { display: grid; min-width: 0; }
.contact-label { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text); }
.contact-value { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; user-select: all; }
a.contact-value { user-select: auto; text-decoration-color: var(--clay); text-underline-offset: 3px; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; min-height: 40px;
  border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  font-weight: 600; font-size: .85rem; cursor: pointer; transition: background-color .25s, color .25s;
}
.copy-btn .icon { width: 1rem; height: 1rem; }
.copy-btn:hover, .copy-btn.is-copied { background: var(--ink); color: var(--porcelain); }

/* --- Form --- */
.form-panel {
  background: var(--surface); border-radius: var(--radius-lg); padding: clamp(22px, 3.4vw, 44px);
  box-shadow: 0 40px 80px -50px rgba(41, 41, 55, .55); border: 1px solid rgba(255, 255, 255, .8);
  min-width: 0;
}
.demo-banner {
  margin-bottom: 22px; padding: 12px 16px; border-radius: 12px;
  background: var(--lilac-tint); color: var(--ink); font-size: .92rem;
}
form { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-weight: 600; font-size: .92rem; color: var(--ink); }
.req { color: var(--clay-deep); }
.opt { color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  background: var(--porcelain); border: 1.5px solid var(--line); border-radius: 12px; color: var(--ink);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232A1B2D' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: #C2CBD8; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px rgba(136, 70, 57, .18);
}
.field [aria-invalid="true"] { border-color: var(--clay-deep); background: #FBF1EE; }
.field-error { color: var(--clay-deep); font-size: .86rem; font-weight: 600; min-height: 0; }
.field-error:empty { display: none; }
.field-foot { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.field-foot .field-error:empty + .hint { margin-left: auto; }
.hint { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: auto; white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 4px; }
.btn-submit[disabled] { opacity: .7; cursor: progress; }
.btn-submit.is-loading .icon { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.privacy-note { font-size: .85rem; color: var(--muted); }
.form-status {
  padding: 16px 18px; border-radius: 14px; font-size: .96rem; line-height: 1.5; outline: none;
  display: grid; gap: 4px;
}
.form-status strong { color: var(--ink); font-family: var(--f-display); font-size: 1.1rem; letter-spacing: -.005em; }
.form-status.is-success { background: var(--sage-tint); }
.form-status.is-demo { background: var(--lilac-tint); }
.form-status.is-error { background: #F5E9E5; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ink); color: #D4D0DA;
  padding-block: clamp(64px, 8vw, 110px) calc(28px + env(safe-area-inset-bottom, 0px));
}
/* slow drifting light behind the footer */
.footer-glow {
  position: absolute; inset: -40% -10% auto; height: 160%; z-index: -1; pointer-events: none;
  animation: glow-drift 18s ease-in-out infinite alternate;
}
.footer-glow::before, .footer-glow::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); }
.footer-glow::before { left: 4%; top: 22%; width: 34%; height: 36%; background: rgba(80, 117, 147, .38); }
.footer-glow::after { right: 6%; top: 42%; width: 30%; height: 32%; background: rgba(136, 70, 57, .22); }
@keyframes glow-drift { to { transform: translate3d(6%, 8%, 0) scale(1.08); } }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 26px 32px; align-items: center; position: relative; }
.footer-name {
  display: flex; align-items: center; gap: .35em; margin: 0;
  font-family: var(--f-display); font-weight: 800; color: var(--porcelain);
  font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1;
}
.footer-mg { width: 1.15em; height: 1.15em; flex: none; color: var(--porcelain); }
.footer-mg .mg-m { stroke: #93B2CC; }
.footer-mg .mg-g { stroke: #A9C2A1; }
.footer-mg path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.footer-word { display: inline-flex; overflow: hidden; padding-bottom: .08em; }
.footer-word .fl { display: inline-block; white-space: pre; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 22px; justify-self: end; margin-right: 76px; }
.footer-nav a { text-decoration: none; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--porcelain); position: relative; }
.footer-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px; background: #D9A396; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.footer-nav a:hover::after, .footer-nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.footer-rule { grid-column: 1 / -1; display: block; height: 1px; background: rgba(255, 255, 255, .16); transform-origin: left; }
.footer-small { grid-column: 1 / -1; font-size: .85rem; color: #A6A2B2; }
.to-top {
  position: absolute; right: 0; top: -6px; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; color: var(--porcelain); background: rgba(255, 255, 255, .06);
  transition: background-color .3s, color .3s;
}
.to-top:hover { background: var(--porcelain); color: var(--ink); }
.to-top > .icon { transition: transform .3s var(--ease); }
.to-top:hover > .icon { transform: translate(2px, -2px); }
.to-top-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top-ring circle { fill: none; stroke: #D9A396; stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: var(--page-left, 1); }

/* entrance: the monogram draws itself, the name rises letter by letter, the line runs across */
html.js-motion .site-footer .footer-mg path { stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease); }
html.js-motion .site-footer .footer-mg path + path { transition-delay: .9s; transition-duration: .8s; }
html.js-motion .site-footer .fl { transform: translateY(110%); transition: transform .9s var(--ease); transition-delay: calc(.35s + var(--i) * 40ms); }
html.js-motion .site-footer .footer-rule { transform: scaleX(0); transition: transform 1.4s var(--ease) .5s; }
html.js-motion .site-footer .footer-nav a, html.js-motion .site-footer .footer-small { opacity: 0; transform: translateY(10px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js-motion .site-footer .footer-nav a:nth-child(1) { transition-delay: .7s; }
html.js-motion .site-footer .footer-nav a:nth-child(2) { transition-delay: .8s; }
html.js-motion .site-footer .footer-nav a:nth-child(3) { transition-delay: .9s; }
html.js-motion .site-footer .footer-nav a:nth-child(4) { transition-delay: 1s; }
html.js-motion .site-footer .footer-small { transition-delay: 1.15s; }
html.js-motion .site-footer.is-in .footer-mg path { stroke-dashoffset: 0; }
html.js-motion .site-footer.is-in .fl { transform: none; }
html.js-motion .site-footer.is-in .footer-rule { transform: none; }
html.js-motion .site-footer.is-in .footer-nav a, html.js-motion .site-footer.is-in .footer-small { opacity: 1; transform: none; }

/* ==========================================================================
   Project dialog
   ========================================================================== */
.project-dialog {
  width: min(1080px, calc(100% - 32px)); max-height: calc(100dvh - 48px);
  padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--text);
  box-shadow: 0 50px 100px -40px rgba(41, 41, 55, .6);
}
.project-dialog::backdrop { background: rgba(41, 41, 55, .55); }
.project-dialog[open] { animation: pop .45s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.pd-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); position: relative; }
.pd-media { background: var(--lilac-tint); padding: clamp(16px, 2.4vw, 28px); display: grid; align-items: start; }
.pd-media img { border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 20px 40px -30px rgba(41, 41, 55, .6); }
.pd-body { padding: clamp(24px, 3vw, 40px); display: grid; gap: 12px; align-content: start; justify-items: start; }
.pd-title { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.7rem, 2.6vw, 2.3rem); letter-spacing: -.005em; line-height: 1.05; }
.pd-sub { font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--clay-deep); margin-top: 10px; }
.pd-body .checks { gap: 9px; font-size: .96rem; }
.pd-visit { margin-top: 12px; }
.pd-close {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--ink); color: var(--porcelain); display: grid; place-items: center; cursor: pointer;
}

/* ==========================================================================
   Mission line (words light up on scroll)
   ========================================================================== */
.mission { padding-block: clamp(84px, 10vw, 150px) clamp(10px, 2vw, 24px); }
.mission-text {
  font-family: var(--f-display); font-weight: 700; color: var(--ink);
  font-size: clamp(1.9rem, 4.3vw, 3.9rem); line-height: 1.1; letter-spacing: -.005em;
  max-width: 1120px; text-wrap: balance;
}
.lit-accent { color: var(--clay-deep); }
.lw { display: inline; }

/* ==========================================================================
   Laptop with keyboard: the lid opens as it scrolls into view (script.js)
   The booking form itself sits below the laptop, so it is never hidden.
   ========================================================================== */
.laptop { position: relative; width: 100%; max-width: 620px; justify-self: center; perspective: 1700px; perspective-origin: 50% 20%; }
.laptop-lid {
  position: relative; z-index: 2; transform-origin: 50% 100%; transform-style: preserve-3d;
  transform: rotateX(var(--lid, 0deg));
  padding: 12px 12px 16px; border-radius: 22px 22px 6px 6px;
  background: #292937;
  will-change: transform;
}
.lid-screen {
  position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden;
  display: grid; align-items: center;
  background: #FFFFFF;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.screen-card { position: relative; display: grid; justify-items: start; gap: clamp(8px, 1.4vw, 14px); padding: clamp(16px, 4.2vw, 40px); padding-right: 38%; }
.screen-url {
  display: inline-flex; align-items: center; gap: 10px; padding: 5px 12px 5px 8px; border-radius: 999px;
  font-size: .74rem; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line);
}
.screen-url .dots i { width: 8px; height: 8px; }
.screen-title { font-family: var(--f-display); font-weight: 800; color: var(--ink); font-size: clamp(1.5rem, 3.3vw, 2.6rem); line-height: 1; letter-spacing: -.005em; }
.screen-text { color: var(--text); font-size: clamp(.9rem, 1.2vw, 1.02rem); max-width: 40ch; }
.lid-back {
  position: absolute; inset: 0; border-radius: inherit; display: grid; place-items: center;
  background: #C6CBD3;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
  transform: rotateX(180deg) translateZ(1px);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.lid-mg { position: relative; width: 26%; height: auto; aspect-ratio: 1; --mg-g: #6E8C67; filter: drop-shadow(0 0 2px #FFFFFF) drop-shadow(0 0 10px rgba(255, 255, 255, .9)); }
.lid-glow { position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: rgba(255, 255, 255, .7); box-shadow: 0 0 36px 22px rgba(255, 255, 255, .75); }
html.js-motion .lid-glow { animation: lid-pulse 2.6s ease-in-out infinite; }
@keyframes lid-pulse { 0%, 100% { opacity: .55; scale: .9; } 50% { opacity: 1; scale: 1.08; } }
/* the monogram on the open screen: draws itself, then breathes gently */
.screen-mg { position: absolute; right: 6%; top: 50%; width: 30%; height: auto; translate: 0 -50%; overflow: visible; }
.screen-mg .mg-m { stroke: var(--mg-m); }
.screen-mg .mg-g { stroke: var(--mg-g); }
.screen-mg path { stroke-dasharray: 1; stroke-dashoffset: 0; }
html.js-motion .screen-mg path { stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease); }
html.js-motion .screen-mg .mg-g { transition-delay: .55s; }
html.js-motion .laptop.is-open .screen-mg path { stroke-dashoffset: 0; }
html.js-motion .laptop.is-open .screen-mg { animation: mg-breathe 3.2s ease-in-out 2s infinite; }
@keyframes mg-breathe { 0%, 100% { scale: 1; filter: drop-shadow(0 0 0 rgba(80, 117, 147, 0)); } 50% { scale: 1.05; filter: drop-shadow(0 6px 14px rgba(80, 117, 147, .35)); } }
.laptop-base { position: relative; z-index: 1; margin-inline: -7%; }
.deck {
  position: relative; height: clamp(74px, 12.5vw, 128px);
  background: #D8DBE1;
  clip-path: polygon(6% 0, 94% 0, 100% 100%, 0 100%);
}
/* keyboard drawn flat, then tilted back so it reads like a MacBook seen from the front */
.keyboard {
  position: absolute; left: 14.5%; right: 14.5%; top: 7%; height: 60%;
  display: grid; grid-template-rows: .62fr repeat(5, 1fr); gap: 2.5%;
  padding: 1.2% 1.4%; border-radius: 4px;
  background: #B8BDC6;
  transform: perspective(420px) rotateX(34deg); transform-origin: 50% 100%;
}
.kb-row { display: flex; gap: .6%; min-height: 0; }
.kb-row i {
  flex: 1; min-width: 0; border-radius: 2.5px;
  background: #202328;
}
.kb-row .k-wide { flex: 1.5; }
.kb-row .k-wider { flex: 2.15; }
.kb-row .k-esc { flex: 1.45; }
.kb-row .k-cmd { flex: 1.3; }
.kb-row .k-space { flex: 5.6; }
.kb-row .k-touch { flex: .9; border-radius: 50%; background: #2E3238; }
.kb-row .k-arrows { flex: 3; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6%; background: none; box-shadow: none; }
.kb-row .k-arrows b { border-radius: 2px; background: #202328; align-self: end; height: 48%; }
.trackpad {
  position: absolute; left: 50%; bottom: 6%; width: 34%; height: 22%; translate: -50% 0; border-radius: 5px;
  background: #D3D6DC; border: 1px solid rgba(41, 41, 55, .14);
}
.lip {
  position: relative; height: 12px;
  background: #B5B9C9;
  border-radius: 0 0 18px 18px / 0 0 12px 12px;
  box-shadow: 0 34px 40px -26px rgba(41, 41, 55, .6);
}
.laptop-notch { position: absolute; left: 50%; top: 0; width: 14%; height: 5px; translate: -50% 0; border-radius: 0 0 8px 8px; background: #989DB6; }

.contact .form-panel { margin-top: clamp(44px, 6vw, 84px); max-width: 1000px; margin-inline: auto; position: relative; }
.form-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; margin-bottom: 20px; }
.form-title { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -.005em; }
.form-sub { font-size: .88rem; color: var(--muted); }

/* Why section: monogram panel */
.why-mark .mark-frame { display: grid; place-items: center; align-content: center; gap: 22px; background: var(--ink); }
.mg-big { width: 54%; height: auto; aspect-ratio: 1; color: var(--porcelain); }
.mark-words { font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #D4D0DA; }

/* ==========================================================================
   Cursor ring (mouse only, set by script.js)
   The normal cursor always stays visible; the ring only adds feedback.
   ========================================================================== */
.cursor { display: none; }
html.has-cursor .cursor { display: block; }
.cursor-ring {
  position: fixed; left: 0; top: 0; z-index: 96; pointer-events: none;
  width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%;
  border: 1.5px solid rgba(41, 41, 55, .55);
  display: grid; place-items: center;
  transition: width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), background-color .2s, border-color .2s, opacity .2s;
}
.cursor-dot { display: none; }
.cursor-label { font-size: .64rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--porcelain); opacity: 0; transition: opacity .15s; white-space: nowrap; }
html.cursor-hover .cursor-ring { width: 54px; height: 54px; margin: -27px 0 0 -27px; background: rgba(136, 70, 57, .1); border-color: var(--clay); }
html.cursor-label-on .cursor-ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(41, 41, 55, .88); border-color: transparent; }
html.cursor-label-on .cursor-label { opacity: 1; }
html.cursor-down .cursor-ring { transform: scale(.85); }
html.cursor-text .cursor-ring, html.cursor-out .cursor-ring, html.dialog-open .cursor-ring { opacity: 0; }

/* ==========================================================================
   Scroll reveals and split headings (plain JS, no libraries)
   Content is only hidden when script.js has turned motion on.
   ========================================================================== */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .06em .12em; margin: 0 -.06em -.12em; }
.w > span { display: inline-block; }
html.js-motion [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s); }
html.js-motion [data-reveal].is-in { opacity: 1; transform: none; }
html.js-motion [data-split] .w > span { transform: translateY(112%); transition: transform 1s var(--ease); transition-delay: calc(var(--d, 0s) + var(--i, 0) * 55ms); }
html.js-motion [data-split].is-in .w > span { transform: none; }
html.js-motion .skills { opacity: 0; transform: translateY(30px) scale(.985); transition: opacity 1s var(--ease) .35s, transform 1.1s var(--ease) .35s; }
html.js-motion .skills.is-in { opacity: 1; transform: none; }
.pillar-line-draw { transition: stroke-dashoffset .15s linear; }

/* Project preview: opening and closing feedback */
.project-dialog.is-closing { animation: pop-out .22s var(--ease) forwards; }
.project-dialog.is-closing::backdrop { animation: fade-out .22s forwards; }
@keyframes pop-out { to { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes fade-out { to { opacity: 0; } }
.work-card.was-opened { animation: ring-pulse 1s var(--ease); }
@keyframes ring-pulse { 0% { box-shadow: 0 0 0 0 rgba(136, 70, 57, .5); } 100% { box-shadow: 0 0 0 14px rgba(136, 70, 57, 0); } }
.browser-hint { transition: color .2s; }
.browser-hint.is-status { color: var(--sage-deep); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .main-nav { gap: 20px; }
  .why-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 920px) {
  .skills-stage { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .skills-film { width: 100%; }
  .skills-tabs { display: none; }
  .skill-slot { height: clamp(220px, 32svh, 280px); }
  .menu-toggle {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
    border: 1.5px solid var(--line); background: var(--surface); cursor: pointer;
  }
  .menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 18px; height: 1.8px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .3s var(--ease), background-color .2s; }
  .menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
  .menu-bars::before { top: -6px; } .menu-bars::after { top: 6px; }
  .menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-bars::after { transform: translateY(-6px) rotate(-45deg); }
  .header-inner { gap: 12px; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    display: none; flex-direction: column; gap: 0;
    background: var(--porcelain); border-bottom: 1px solid var(--line);
    padding: 8px max(var(--gutter-r), 3.2vw) 18px max(var(--gutter), 3.2vw);
    box-shadow: 0 30px 40px -30px rgba(41, 41, 55, .35);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding-block: 14px; border-bottom: 1px solid var(--line); font-size: .85rem; }
  .main-nav a::after { display: none; }

  .hero-intro { grid-template-columns: minmax(0, 1fr); }
  .hero-side { padding-bottom: 0; }
  .section-head-split { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .pillar { grid-template-columns: 64px minmax(0, 1fr); }
  .pillar-detail { grid-column: 2; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .work-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; }
  .why-grid { grid-template-columns: minmax(0, 1fr); }
  .why-photo { max-width: 340px; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .laptop { max-width: 560px; margin-inline: auto; }
  .pd-inner { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .skills { border-radius: 22px; padding: 12px 12px 14px; }
  .skills-film { border-radius: 16px; }
  .skill-slot { height: clamp(210px, 30svh, 260px); }
  .skill-card { padding: 16px 16px 18px; gap: 6px; }
  .skills-arrow { width: 44px; height: 44px; }
  .btn-row .btn { flex: 1 1 auto; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .footer-nav { justify-self: start; margin-right: 0; }
  .to-top { top: -6px; }
  .contact-list li { grid-template-columns: minmax(0, 1fr); }
  .contact-list .copy-btn { justify-self: start; }
  .laptop { margin-inline: 7%; width: auto; }
  .screen-card .btn { min-height: 44px; padding: .7rem 1.1rem; font-size: .9rem; }
  .screen-text { display: none; }
}

@media (max-width: 520px) {
  .note-lines { font-size: .7rem; padding: 10px 12px 12px; gap: 5px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .pillar { grid-template-columns: minmax(0, 1fr); }
  .pillar-detail { grid-column: auto; }
  .pillar-line { display: none; }
  .pillar-mark { padding: 0 0 4px; justify-self: start; }
  .header-cta span { display: none; }
  .header-cta { width: 46px; padding: 0; }
  .wordmark { font-size: 1.08rem; }
  .screen-url { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   Tools I use
   ========================================================================== */
.tools { padding-block: var(--section-y); border-top: 1px solid var(--line); }
.tool-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); }
.tool-card {
  height: 100%; display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 18px;
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s;
}
.tool-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 22px 40px -28px rgba(41, 41, 55, .5); }
.tc-title { font-family: var(--f-display); font-weight: 700; font-size: 1.12rem; color: var(--ink); line-height: 1.2; margin: 0; }
.tc-sub { font-size: .9rem; color: var(--muted); margin: 0; }
.tc-chips { list-style: none; margin: 10px 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tc-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--porcelain);
  font-size: .86rem; font-weight: 600; color: var(--ink); line-height: 1.2;
  transition: transform .4s var(--ease), border-color .3s, box-shadow .4s var(--ease);
}
.tc-chip:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 10px 18px -14px rgba(41, 41, 55, .5); }
.tc-logo { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); transition: transform .5s var(--ease); }
.tc-logo img { width: 16px; height: 16px; object-fit: contain; }
.tc-chip:hover .tc-logo { transform: rotate(-8deg) scale(1.08); }
.is-initials { font-size: .62rem; font-weight: 800; letter-spacing: .02em; color: var(--sage-deep); background: var(--sage-tint); }
html.js-motion .tool-card-item[data-reveal] { opacity: 0; transform: scale(.86); transition: opacity .8s var(--ease) var(--d, 0s), transform 1s cubic-bezier(.34, 1.36, .5, 1) var(--d, 0s); }
html.js-motion .tool-card-item[data-reveal].is-in { opacity: 1; transform: none; }
html.js-motion .tool-card-item .tc-chip { opacity: 0; transform: translateY(10px) scale(.7); }
html.js-motion .tool-card-item .tc-logo { transform: rotate(-120deg) scale(.4); }
html.js-motion .tool-card-item.is-in .tc-logo { transform: none; transition: transform .7s cubic-bezier(.34, 1.56, .64, 1) calc(var(--d, 0s) + .3s + var(--i) * 70ms); }
html.js-motion .tool-card-item.is-in .tc-chip:hover .tc-logo { transform: rotate(-8deg) scale(1.08); transition-delay: 0s; }
html.js-motion .tool-card-item.is-in .tc-chip { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .6s cubic-bezier(.34, 1.56, .64, 1), border-color .3s, box-shadow .4s var(--ease); transition-delay: calc(var(--d, 0s) + .3s + var(--i) * 70ms); }
html.js-motion .tool-card-item.is-in .tc-chip:hover { transition-delay: 0s; transform: translateY(-2px); }
.tools-note { margin-top: 28px; font-size: .8rem; color: var(--muted); }




@media (max-width: 920px) {
  .tool-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .tool-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tool-card { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .tool-card, .tc-chip, .tc-logo { transition: none; }
  .tool-card:hover, .tc-chip:hover, .tc-chip:hover .tc-logo { transform: none; }
}

/* ---------- Fixes, 6 Nov 2026: no sideways scrolling and easier tapping on phones ---------- */
html, body { overflow-x: clip; }
footer a:not([class]) { display: inline-block; padding-block: 4px; }

/* MG Flows logo (same as mgflows site), used as an image everywhere */
.mg-mark { width: 66px; height: 34px; object-fit: contain; }
.lid-mg { width: 40%; aspect-ratio: 272 / 140; object-fit: contain; filter: drop-shadow(0 0 6px rgba(255,255,255,.9)); }
.screen-mg { width: 40%; aspect-ratio: 272 / 140; object-fit: contain; }
.footer-mg { width: 2.25em; height: 1.15em; object-fit: contain; }
