/* Sajjad Ali · portfolio — built on the "Always Open" design system (tokens.json). */
:root {
  --paper: #cdc8b4; --paper-raised: #e6e0cf; --paper-sunken: #c2bca6;
  --ink: #14352c; --ink-soft: #4a3e33; --muted: #4e4836; --ink-accent: #1e4a3c;
  --line: #8f8873; --line-strong: #6b6450;
  --pine: #14352c; --on-pine: #e6e0cf;
  --ruby: #eb2839; --ruby-ink: #94101c; --cta: #c41e2e; --on-cta: #fbf3e6; --focus: #14352c;
  --pigment-pine: #1e4a3c; --pigment-sage: #6f8f72; --pigment-mint: #a9c2a2; --pigment-ochre: #c9a25e; --pigment-terra: #b7704f; --pigment-rose: #e79a9a; --on-pigment: #06140f;
  --wash-sky: #9fc3b8;
  --wash-alpha: .55;
  --shadow-paper: 0 1px 0 rgba(20, 53, 44, .10), 0 10px 24px -14px rgba(20, 53, 44, .45);
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-text: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-hand: Caveat, "Segoe Print", "Bradley Hand", cursive;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --radius-sm: 6px; --radius-md: 14px; --radius-bubble: 22px; --radius-pill: 999px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f2a22; --paper-raised: #163a2f; --paper-sunken: #0b211b;
    --ink: #e6e0cf; --ink-soft: #cdc8b4; --muted: #a8a592; --ink-accent: #a9c2a2;
    --line: #4c7564; --line-strong: #5f8e7b; --ruby-ink: #ff7a82; --focus: #ff7a82; --wash-sky: #2e5a4c; --wash-alpha: .28;
    --shadow-paper: 0 1px 0 rgba(0, 0, 0, .30), 0 12px 28px -14px rgba(0, 0, 0, .70);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f2a22; --paper-raised: #163a2f; --paper-sunken: #0b211b;
  --ink: #e6e0cf; --ink-soft: #cdc8b4; --muted: #a8a592; --ink-accent: #a9c2a2;
  --line: #4c7564; --line-strong: #5f8e7b; --ruby-ink: #ff7a82; --focus: #ff7a82; --wash-sky: #2e5a4c; --wash-alpha: .28;
  --shadow-paper: 0 1px 0 rgba(0, 0, 0, .30), 0 12px 28px -14px rgba(0, 0, 0, .70);
  color-scheme: dark;
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background-color: var(--paper); color: var(--ink); font: 400 17px/1.65 var(--font-text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--ruby-ink); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(32px, 4.2vw, 48px); line-height: 1.08; }
h3 { font-size: 24px; line-height: 1.25; }
p { margin: 0; }
.defs { position: absolute; }
.wrap { max-width: 1200px; margin-inline: auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--pine); color: var(--on-pine); padding: 8px 14px; border-radius: var(--radius-sm); z-index: 100; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.eyebrow { font: 500 13px/18px var(--font-mono); letter-spacing: 2.5px; text-transform: uppercase; color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: var(--space-2); font: 600 16px/1 var(--font-text); padding: 14px 24px; border-radius: var(--radius-pill); border: 2px solid transparent; text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 10px 18px; font-size: 15px; }
.btn-lg { padding: 17px 30px; font-size: 17px; }
.btn-cta { background: var(--cta); color: var(--on-cta); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-quiet:hover { background: var(--paper-raised); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; padding-block: 12px; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--pine); z-index: 30; }
.nav { display: flex; align-items: center; gap: var(--space-6); background: var(--pine); color: var(--on-pine); border-radius: var(--radius-md); padding-block: 10px; box-shadow: var(--shadow-paper); }
.nav-mark { font: 700 32px/1 var(--font-hand); color: var(--on-pine); text-decoration: none; margin-right: auto; }
.nav-links { display: flex; gap: var(--space-5); }
.nav-links a { color: var(--on-pine); font: 500 13px/18px var(--font-mono); letter-spacing: 2px; text-transform: uppercase; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a.active { border-bottom-color: var(--ruby); }
.nav .btn-cta:focus-visible, .nav a:focus-visible { outline-color: var(--on-pine); }

/* hero */
.hero { padding-block: var(--space-7) var(--space-8); position: relative; }
.hero::before { content: ""; position: absolute; inset: -120px 0 auto; height: 520px; background: radial-gradient(60% 70% at 70% 30%, var(--wash-sky), transparent 70%); opacity: var(--wash-alpha); pointer-events: none; z-index: -1; filter: url(#wc); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: var(--space-7); align-items: center; }
.hero-copy { display: grid; gap: var(--space-5); align-content: center; }
.hero-name { font-size: clamp(64px, 10vw, 128px); line-height: .92; letter-spacing: -1.5px; color: var(--ink); }
.hero-tag { font: italic 500 clamp(26px, 3.2vw, 38px)/1.25 var(--font-display); color: var(--ink-accent); }
.underlined { position: relative; white-space: nowrap; }
.underlined svg { position: absolute; left: 0; right: 0; bottom: -6px; width: 100%; height: 14px; overflow: visible; }
.underlined path, .cta-ask path { fill: none; stroke: var(--ruby); stroke-width: 6; stroke-linecap: round; }
.hero-intro { font-size: 19px; line-height: 1.6; color: var(--ink-soft); max-width: 58ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero-facts { list-style: none; margin: var(--space-3) 0 0; padding: var(--space-5) 0 0; border-top: 1.5px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.hero-facts li { display: grid; gap: 4px; }
.fact-num { font: 600 44px/1 var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.fact-label { font: 400 14px/1.4 var(--font-text); color: var(--muted); }
.hero-portrait { position: relative; margin: 0; max-width: 520px; justify-self: center; width: 100%; }
.hero-portrait .washes, .about-img .washes { position: absolute; inset: -6% -10% -2%; width: 120%; height: 108%; z-index: 0; }
.washes ellipse { opacity: var(--wash-alpha); }
.w-mint { fill: var(--pigment-mint); } .w-rose { fill: var(--pigment-rose); opacity: calc(var(--wash-alpha) * .7) !important; } .w-ochre { fill: var(--pigment-ochre); opacity: calc(var(--wash-alpha) * .6) !important; } .w-sky { fill: var(--wash-sky); } .w-sage { fill: var(--pigment-sage); }
.hero-portrait img { position: relative; z-index: 1; width: 100%; }
.hand-note { display: inline-flex; flex-direction: column; color: var(--ink-soft); font: 600 28px/1.1 var(--font-hand); }
.hand-note svg { overflow: visible; }
.hand-note path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.hand-note circle { fill: currentColor; }
.hero-note { position: absolute; right: -10%; top: -2%; z-index: 2; align-items: flex-end; text-shadow: 0 0 10px var(--paper), 0 0 4px var(--paper); }

/* sections */
.section { padding-block: var(--space-9); }
.band-sunken { background: var(--paper-sunken); padding-block: var(--space-9); }
.band-wash { position: relative; isolation: isolate; }
.band-wash::before { content: ""; position: absolute; inset: 0; background: radial-gradient(40% 60% at 12% 30%, var(--pigment-mint), transparent 70%), radial-gradient(35% 50% at 88% 75%, var(--pigment-rose), transparent 70%); opacity: calc(var(--wash-alpha) * .55); z-index: -1; }
.section-head { display: grid; gap: var(--space-3); max-width: 760px; margin-bottom: var(--space-7); }
.section-lede { font-size: 18px; color: var(--ink-soft); max-width: 62ch; }

/* film */
.film-frame { position: relative; margin: 0; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-paper); aspect-ratio: 16 / 9; background: var(--paper); }
.film-frame video { width: 100%; height: 100%; display: block; object-fit: cover; }
.film-toggle { position: absolute; left: 14px; bottom: 14px; font: 500 12px/1 var(--font-mono); letter-spacing: 2px; text-transform: uppercase; background: var(--pine); color: var(--on-pine); border: 0; border-radius: var(--radius-pill); padding: 9px 14px; cursor: pointer; opacity: .9; }
.film-toggle:hover { opacity: 1; }

/* cards */
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.card { background: var(--paper-raised); border-radius: var(--radius-md); box-shadow: var(--shadow-paper); min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.service { padding: var(--space-6) var(--space-5); gap: var(--space-3); }
.service p { color: var(--ink-soft); }
.motif { width: 64px; height: 64px; }
.m-paper { fill: var(--paper); stroke: var(--ink-soft); stroke-width: 2; } .m-line { stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round; }
.m-rose { fill: var(--pigment-rose); } .m-ruby { fill: var(--ruby); } .m-sage { fill: var(--pigment-sage); } .m-ochre { fill: var(--pigment-ochre); } .m-mint { fill: var(--pigment-mint); } .m-pine { fill: var(--pine); }
.ticks { list-style: none; padding: 0; margin: var(--space-2) 0 0; display: grid; gap: 6px; font-size: 15px; color: var(--ink-soft); }
.ticks li { display: flex; gap: 10px; align-items: baseline; }
.ticks li::before { content: ""; flex: none; width: 14px; height: 11px; background: var(--ruby); clip-path: polygon(0 55%, 18% 38%, 40% 62%, 84% 0, 100% 16%, 40% 100%); transform: translateY(1px); }
.work-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper); }
.work-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.work:hover .work-img img { transform: scale(1.04); }
.card-body { padding: var(--space-5); display: grid; gap: var(--space-3); }
.card-body p { color: var(--ink-soft); font-size: 16px; }
.meta { font: 500 12px/16px var(--font-mono) !important; letter-spacing: 2px; text-transform: uppercase; color: var(--muted) !important; }

/* skills */
.skill-grid { list-style: none; padding: 0; margin: 0 0 var(--space-7); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-5); }
.skill { display: grid; justify-items: center; gap: var(--space-3); text-align: center; }
.disc { width: 116px; height: 116px; max-width: 100%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; position: relative; isolation: isolate; }
.disc::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--c); filter: url(#wc); opacity: .9; z-index: -1; }
.disc::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 2px solid var(--ink-soft); opacity: .35; }
.d-ochre { --c: var(--pigment-ochre); } .d-rose { --c: var(--pigment-rose); } .d-mint, .d-mint2 { --c: var(--pigment-mint); } .d-sage { --c: var(--pigment-sage); } .d-terra { --c: var(--pigment-terra); }
.disc b { font: 600 22px/1 var(--font-mono); color: var(--on-pigment); }
.disc b.chip { background: var(--pine); color: var(--on-pine); padding: 10px 10px; border-radius: 6px; font-size: 18px; }
.disc b.serif { font: italic 600 32px/1 var(--font-display); }
.skill-name { font: 700 26px/1.1 var(--font-hand); color: var(--ink); }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tags li { font: 500 12px/16px var(--font-mono); letter-spacing: 1.8px; text-transform: uppercase; padding: 6px 13px; border-radius: var(--radius-pill); border: 1.5px solid var(--line-strong); color: var(--ink); }
.tags-sm li { padding: 4px 10px; font-size: 11px; border: 0; color: var(--on-pigment); }
.t-pine { background: var(--pine); color: var(--on-pine) !important; } .t-sage { background: var(--pigment-sage); } .t-ochre { background: var(--pigment-ochre); } .t-mint { background: var(--pigment-mint); } .t-rose { background: var(--pigment-rose); } .t-terra { background: var(--pigment-terra); }

/* process */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-5); counter-reset: step; }
.step { position: relative; padding-top: var(--space-7); display: grid; gap: var(--space-2); align-content: start; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; top: 0; left: 0; font: 400 14px/20px var(--font-mono); color: var(--muted); }
.step::after { content: ""; position: absolute; top: 30px; left: 0; right: -24px; height: 2px; background: var(--line); }
.step:last-child::after { right: 0; }
.step h3 { font-size: 26px; }
.step h3::before { content: ""; position: absolute; top: 24px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--ruby); box-shadow: 0 0 0 4px var(--paper-sunken); }
.step p { color: var(--ink-soft); font-size: 15px; line-height: 1.55; }

/* experience */
.exp-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: var(--space-8); align-items: start; }
.sticky-head { position: sticky; top: 110px; margin-bottom: 0; justify-items: start; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 var(--space-6); border-left: 2px solid var(--line); display: grid; gap: var(--space-7); }
.timeline li { position: relative; display: grid; gap: 6px; }
.timeline li::before { content: ""; position: absolute; left: calc(-1 * var(--space-6) - 9px); top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--pigment-mint); border: 2px solid var(--pine); }
.timeline li:first-child::before { background: var(--ruby); border-color: var(--ruby); }
.when { font: 400 14px/20px var(--font-mono); color: var(--muted); }
.where { font: 700 24px/1.1 var(--font-hand); color: var(--ink-accent); }
.timeline li > p:last-child { color: var(--ink-soft); }

/* faq bubbles */
.bubbles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-7) var(--space-6); }
.qa { display: grid; gap: var(--space-5); justify-items: start; }
.qa:nth-child(even) { justify-items: end; text-align: right; }
.bubble { position: relative; background: var(--paper-raised); border: 1.5px solid var(--line-strong); border-radius: var(--radius-bubble); padding: 12px 22px 14px; font: 600 28px/1.15 var(--font-hand); color: var(--ink); box-shadow: var(--shadow-paper); max-width: 460px; }
.bubble::after { content: ""; position: absolute; bottom: -14px; left: 28px; width: 22px; height: 18px; background: var(--paper-raised); border-left: 1.5px solid var(--line-strong); border-bottom: 1.5px solid var(--line-strong); transform: skewX(-28deg); border-bottom-left-radius: 4px; }
.qa:nth-child(even) .bubble::after { left: auto; right: 28px; transform: skewX(28deg) scaleX(-1); }
.bubble::before { content: ""; position: absolute; top: -16px; right: -12px; width: 34px; height: 30px; background: var(--ruby); clip-path: polygon(0 55%, 18% 38%, 40% 62%, 84% 0, 100% 16%, 40% 100%); }
.qa:nth-child(even) .bubble::before { right: auto; left: -12px; }
.answer { font: italic 500 22px/1.35 var(--font-display); color: var(--ink); max-width: 46ch; }

/* about */
.about-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: var(--space-8); align-items: center; }
.about-img { position: relative; max-width: 380px; justify-self: center; }
.about-img img { position: relative; z-index: 1; }
.about-copy { display: grid; gap: var(--space-4); }
.about-copy > p:not(.eyebrow) { color: var(--ink-soft); max-width: 62ch; }
.facts { margin: var(--space-3) 0 0; display: grid; gap: var(--space-3); border-top: 1.5px solid var(--line); padding-top: var(--space-5); }
.facts div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--space-4); }
.facts dt { font: 500 12px/24px var(--font-mono); letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; color: var(--ink); }

/* contact */
.contact { padding-block: var(--space-9); }
.cta-lines { text-align: center; display: grid; justify-items: center; gap: var(--space-3); margin-bottom: var(--space-8); }
.cta-line { font: italic 500 clamp(28px, 3.6vw, 44px)/1.2 var(--font-display); color: var(--ink); text-wrap: balance; }
.cta-line.second { color: var(--ink-accent); }
.cta-ask { font: 700 clamp(56px, 8vw, 96px)/1 var(--font-hand); color: var(--ruby-ink); margin-top: var(--space-4); }
.cta-ask svg { display: block; width: 100%; height: 16px; margin-top: 4px; overflow: visible; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: var(--space-8); align-items: start; }
.contact-form { display: grid; gap: var(--space-5); background: var(--paper-raised); border-radius: var(--radius-md); box-shadow: var(--shadow-paper); padding: var(--space-6); }
.field { display: grid; gap: var(--space-2); }
.field label { font: 500 12px/16px var(--font-mono); letter-spacing: 2px; text-transform: uppercase; color: var(--ink); }
.field input, .field textarea { font: 400 16px/24px var(--font-text); color: var(--ink); background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: 11px 14px; width: 100%; }
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .8; }
.hint { font-size: 14px; color: var(--muted); }
.field.error input, .field.error textarea { border-color: var(--ruby-ink); }
.field .err { font-size: 14px; color: var(--ruby-ink); }
.contact-form .btn { justify-self: start; }
.form-note { font-size: 14px; color: var(--muted); }
.contact-direct { display: grid; gap: var(--space-4); padding-top: var(--space-3); }
.direct-label { font: 700 30px/1.1 var(--font-hand); color: var(--ink-soft); }
.direct-item { display: grid; gap: 2px; font-size: 17px; overflow-wrap: anywhere; }
.direct-k { font: 500 12px/16px var(--font-mono); letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.direct-item a { color: var(--ink); text-decoration-color: var(--ruby); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* footer */
.site-footer { background: var(--pine); color: var(--on-pine); padding-block: var(--space-7); }
.footer-grid { display: flex; justify-content: space-between; align-items: end; gap: var(--space-6); flex-wrap: wrap; }
.footer-small { font-size: 14px; opacity: .85; }
.signature { text-align: right; display: grid; gap: 6px; }
.sig-name { font: 700 52px/1 var(--font-hand); }
.sig-role { font: 500 12px/16px var(--font-mono); letter-spacing: 2.5px; text-transform: uppercase; }
.sig-tag { font: italic 500 22px/1.3 var(--font-display); color: var(--pigment-mint); }

/* hover: everything that can be touched answers the pointer, gently and in the paper's own way.
   Only on devices with a real hover, and only when motion is welcome. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  /* nav: a Ruby brush stroke grows under the link */
  .nav-links a { border-bottom: 0; position: relative; }
  .nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ruby); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
  .nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
  .nav-links a:hover, .nav-links a.active { border-bottom-color: transparent; }
  .nav-mark { transition: transform .3s ease; display: inline-block; }
  .nav-mark:hover { transform: rotate(-3deg) scale(1.04); }

  /* buttons: lift, a soft shadow and a sheen sweeping across the CTA */
  .btn { position: relative; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease; }
  .btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(20, 53, 44, .55); }
  .btn:active { transform: translateY(0); box-shadow: none; }
  .btn-cta::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); transform: translateX(-120%); transition: transform .6s ease; }
  .btn-cta:hover::before { transform: translateX(120%); }
  .btn-quiet:hover { border-color: var(--ink); }

  /* the hero portrait breathes and its washes drift */
  .hero-portrait img { transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
  .hero-portrait:hover img { transform: translateY(-6px) scale(1.015); }
  .hero-portrait .washes { transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
  .hero-portrait:hover .washes { transform: scale(1.05) rotate(-2deg); }
  .hero-facts li { transition: transform .3s ease; }
  .hero-facts li:hover { transform: translateY(-3px); }
  .hero-facts li:hover .fact-num { color: var(--ruby-ink); }
  .fact-num { transition: color .3s ease; }

  /* cards lift off the page like a sheet picked up */
  .card { transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease; }
  .card:hover { transform: translateY(-6px) rotate(-.3deg); box-shadow: 0 2px 0 rgba(20, 53, 44, .08), 0 24px 40px -20px rgba(20, 53, 44, .6); }
  .service .motif { transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
  .service:hover .motif { transform: rotate(-8deg) scale(1.12); }
  .ticks li::before { transition: transform .3s ease; }
  .service:hover .ticks li::before { transform: translateY(1px) scale(1.2); }
  .service:hover .ticks li:nth-child(2)::before { transition-delay: .06s; }
  .service:hover .ticks li:nth-child(3)::before { transition-delay: .12s; }
  .work-img img { transition: transform .8s cubic-bezier(.2, .7, .2, 1), filter .8s ease; }
  .work:hover .work-img img { transform: scale(1.06); filter: saturate(1.15); }

  /* skill discs: the wash spins slowly and swells */
  .disc::before { transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
  .disc::after { transition: transform .5s ease, opacity .5s ease; }
  .disc b { transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
  .skill:hover .disc::before { transform: rotate(160deg) scale(1.12); }
  .skill:hover .disc::after { transform: scale(1.1); opacity: .6; }
  .skill:hover .disc b { transform: scale(1.15); }
  .skill-name { transition: color .3s ease; }
  .skill:hover .skill-name { color: var(--ruby-ink); }
  .tags li { transition: transform .2s ease, background-color .2s ease, border-color .2s ease; }
  .tags:not(.tags-sm) li:hover { transform: translateY(-2px); background: var(--paper-raised); border-color: var(--ink); }

  /* process: the step's dot pops, its line fills with Ruby */
  .step::after { background: linear-gradient(90deg, var(--ruby) 50%, var(--line) 50%) right / 200% 100% no-repeat; transition: background-position .5s ease; }
  .step:hover::after { background-position: left; }
  .step h3::before { transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
  .step:hover h3::before { transform: scale(1.5); }

  /* timeline: the entry slides in a touch, its dot fills */
  .timeline li { transition: transform .3s ease; }
  .timeline li:hover { transform: translateX(6px); }
  .timeline li::before { transition: background-color .3s ease, transform .3s ease; }
  .timeline li:hover::before { background: var(--ruby); border-color: var(--ruby); transform: scale(1.2); }

  /* speech bubbles tilt like they were just spoken; the tick bounces */
  .bubble { transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
  .qa:hover .bubble { transform: rotate(-1.5deg) translateY(-3px); }
  .qa:nth-child(even):hover .bubble { transform: rotate(1.5deg) translateY(-3px); }
  .bubble::before { transition: transform .4s cubic-bezier(.3, 1.8, .5, 1); }
  .qa:hover .bubble::before { transform: scale(1.25) rotate(-8deg); }

  /* about portrait and contact links */
  .about-img img { transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
  .about-img:hover img { transform: translateY(-5px) rotate(-1deg); }
  .direct-item a { text-decoration: none; background: linear-gradient(var(--ruby), var(--ruby)) left bottom / 100% 2px no-repeat; padding-bottom: 3px; transition: background-size .35s ease, color .2s ease; }
  .direct-item a:hover { background-size: 0 2px; background-position: right bottom; color: var(--ruby-ink); }
  .film-frame { transition: box-shadow .4s ease; }
  .film-frame:hover { box-shadow: 0 2px 0 rgba(20, 53, 44, .08), 0 30px 50px -24px rgba(20, 53, 44, .6); }
  .field input, .field textarea { transition: border-color .2s ease, background-color .2s ease; }
  .field input:hover, .field textarea:hover { border-color: var(--ink); }
  .sig-name { transition: transform .4s ease; display: inline-block; }
  .signature:hover .sig-name { transform: rotate(-2deg); }
}

/* scroll reveal: a small settle as items come into view. Content is ALWAYS visible (no opacity or clipping),
   so full-page screenshots, crawlers and browsers that never report scrolling see everything. */
.js .reveal { translate: 0 16px; transition: translate .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { translate: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { translate: none; transition: none; }
  .btn, .btn .arrow, .work-img img { transition: none; }
}

/* responsive */
@media (max-width: 1020px) {
  .skill-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step::after { display: none; }
  .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .hero-grid, .exp-grid, .about-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-portrait { max-width: 380px; order: -1; }
  .hero-note { right: 0; top: 2%; font-size: 24px; }
  .sticky-head { position: static; }
  .bubbles { grid-template-columns: minmax(0, 1fr); }
  .nav-links { display: none; }
  .section, .band-sunken, .contact { padding-block: var(--space-8); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-top: var(--space-4); }
  .hero-portrait { max-width: 270px; }
  .hero-note { font-size: 22px; right: -18%; }
  .cards-3 { grid-template-columns: minmax(0, 1fr); }
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .hero-facts { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .hero-facts li { grid-template-columns: 90px minmax(0, 1fr); align-items: center; }
  .fact-num { font-size: 36px; }
  .disc { width: 96px; height: 96px; }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .contact-form { padding: var(--space-5); }
  .bubble { font-size: 24px; }
  .nav { gap: var(--space-3); }
  .nav-mark { font-size: 28px; }
}

/* spam honeypot: hidden from people, visible to bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* blog and page content (index.php) */
.entry { font-size: 18px; color: var(--ink-soft); }
.entry p + p { margin-top: 1em; }
.entry a { color: var(--ruby-ink); }
