/* Plain typography and one shared accent. Components use semantic tokens. */
:root {
  --light-paper: #ffffff; --light-ink: #0a0a0a; --light-muted: #5c5c5c;
  --light-rule: #d6d6d6; --light-accent: #1d4ed8; --light-surface: #f5f5f3;
  --dark-paper: #0b0b0c; --dark-ink: #f2f2f0; --dark-muted: #a1a1a6;
  --dark-rule: #38383a; --dark-accent: #7aa2ff; --dark-surface: #131315;
  --paper: var(--light-paper); --ink: var(--light-ink); --muted: var(--light-muted);
  --rule: var(--light-rule); --rule-strong: var(--ink); --accent: var(--light-accent); --surface: var(--light-surface);
  --bg: var(--paper); --text: var(--ink); --line: var(--rule); --card: var(--paper);
  --accent-soft: var(--surface); --inverse-accent: var(--dark-accent); --radius: 6px; --logo-filter: brightness(1);
  --gutter: clamp(20px, 4vw, 56px); --gap: clamp(24px, 2vw, 32px);
  /* The --ease alias is reserved for the unchanged intro. */
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-press: 100ms; --dur-fast: 150ms; --dur-base: 220ms;
  --dur-enter: 450ms; --dur-exit: 360ms; --dur-confirm: 250ms;
  --stagger: 30ms; --hero-stagger: 50ms;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: var(--dark-paper); --ink: var(--dark-ink); --muted: var(--dark-muted);
    --rule: var(--dark-rule); --accent: var(--dark-accent); --surface: var(--dark-surface);
    --inverse-accent: var(--light-accent); --logo-filter: brightness(0) invert(1); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: var(--dark-paper); --ink: var(--dark-ink); --muted: var(--dark-muted);
  --rule: var(--dark-rule); --accent: var(--dark-accent); --surface: var(--dark-surface);
    --inverse-accent: var(--light-accent); --logo-filter: brightness(0) invert(1); color-scheme: dark;
}
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--dur-base); animation-timing-function: var(--ease-in-out); }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.5 Inter, Arial, sans-serif; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
body.noscroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; text-underline-offset: .22em; }
a:hover { text-decoration-color: var(--accent); }
button, input { font: inherit; }
button { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd { overflow-wrap: break-word; }
p { max-width: 65ch; }
button, a, [tabindex] { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 0; }
.wrap { width: min(1440px, calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 210; padding: 10px 16px; background: var(--ink); color: var(--paper); }
.skip:focus { left: 8px; }

/* Wordmark and navigation. */
.nav { position: sticky; top: 0; z-index: 50; background: var(--paper); border: 0; }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 32px; min-height: 88px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; font-size: 17px; font-weight: 700; letter-spacing: 0; }
.mono { display: none; }
.links, .nav-pages, .nav-actions { display: flex; align-items: center; gap: 28px; }
.links a, .theme, .burger, .meta, .contact-link-label { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.links a { position: relative; padding-block: 8px; color: var(--muted); white-space: nowrap; }
.links a:hover, .links a.active { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }
.links a.nav-contact { color: var(--accent); }
.theme, .burger { display: grid; place-items: center; width: 38px; height: 38px; border: 0; padding: 0; background: var(--paper); color: var(--ink); cursor: pointer; }
.theme:hover, .burger:hover {  }
.theme svg { width: 17px; height: 17px; }
.burger { display: none; position: relative; }

/* Controls and comma-separated tool lists. */
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin-top: 30px; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 11px 16px; border: 0; background: transparent; color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.btn.primary {  background: var(--ink); color: var(--paper); }
.btn.ghost:hover { color: var(--accent); }
.text-link, .hero .btn { padding: 4px 0; border: 0; background: transparent; color: var(--ink); }
.hero .btn { justify-content: start; border: 0; font-size: 15px; }
.hero .btn:hover { color: var(--accent);  }
.chips { display: flex; flex-wrap: wrap; gap: 8px 0; margin-top: 18px; font-size: 15px; color: var(--muted); line-height: 1.8; }
.chips li { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; }
.chips li:not(:last-child)::after { content: "/"; display: inline-block; padding-inline: 8px; color: var(--muted); }
.tool-logo { width: 16px; height: 16px; flex-shrink: 0; object-fit: contain; filter: var(--logo-filter); }
.organization-name { display: flex; align-items: center; gap: 10px; }
.organization-logo { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; }
.organization-name img[src$="/semrush.svg"] { filter: var(--logo-filter); }

/* Hero uses the same twelve-column grid as the sections below it. */
.hero { position: relative; overflow: clip; padding-top: clamp(48px, 6vw, 92px); }
.hero-in { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: var(--gap); align-items: start; }
.hero-copy { grid-column: 1 / 9; min-width: 0; }
.hero h1 { font-size: clamp(56px, 7.8vw, 112px); line-height: 1; letter-spacing: -.01em; font-weight: 700; text-wrap: initial; max-width: 12ch; }
.hero .lead { max-width: 36ch; margin-top: 40px; font-size: clamp(19px, 1.9vw, 26px); color: var(--ink); line-height: 1.4; letter-spacing: 0; }
.hero-portrait { grid-column: 9 / -1; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; margin-top: 44px; }
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 65%; }

/* Sections grouped by spacing. */
.section { padding: 48px 0 64px; overflow-x: clip; }
.section-title { font-size: clamp(30px, 3.2vw, 46px); font-weight: 650; line-height: 1.15; margin-bottom: 24px; max-width: 28ch; }
.section-sub { color: var(--muted); margin-bottom: 40px; }
.sub-title { font-size: clamp(23px,2.4vw,34px); margin: 52px 0 22px; letter-spacing: 0; line-height: 1.15; }
.meta { color: var(--muted); margin-bottom: 14px; }
.narrow { max-width: 65ch; }
.note { margin-top: 18px; max-width: 65ch; font-size: 13px; color: var(--muted); }
.note.strong { color: var(--ink); }
.cards { display: block; margin-top: 38px; }
.role-card { display: grid; grid-template-columns: minmax(0,.7fr) minmax(0,1.3fr); gap: 16px 48px; align-items: start; padding: 28px 0; }
.role-card h3 { grid-column: 1; font-size: clamp(24px,2.5vw,34px); line-height: 1.2; font-weight: 600; }
.role-card p { grid-column: 2; font-size: 16px; color: var(--muted); }
.role-go { grid-column: 2; color: var(--accent); font-size: 15px; text-decoration: underline; width: fit-content; }
.about-grid, .two-col { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); gap: var(--gap); align-items: start; }
.about-grid > div, .two-col > div { min-width: 0; }
.about-grid p { color: var(--muted); margin-bottom: 18px; }
.about-grid h3 { font-size: 20px; margin: 0 0 24px; font-weight: 600; }
.facts { margin-top: 36px; }
.facts > div { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 16px; border: 0; padding: 16px 0; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.about-discover { position: relative; text-underline-offset: 6px; }
.about-discover:hover { text-decoration: underline; }
.about-hint { position: absolute; bottom: calc(100% + 12px); left: 0; width: max-content; max-width: min(280px,calc(100vw - 40px)); padding: 12px 16px; border: 0; background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 400; letter-spacing: 0; line-height: 1.5; opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); z-index: 2; }
.about-discover:hover .about-hint, .about-discover:focus-visible .about-hint { opacity: 1; visibility: visible; transform: none; }
.timeline { display: grid; }
.tl-item { display: grid; grid-template-columns: 6px minmax(0,1fr) minmax(80px,auto); gap: 12px; padding: 23px 0; border: 0; align-items: start; }
.tl-item h4 { font-size: 16px; font-weight: 600; line-height: 1.3; }
.tl-item p { font-size: 12px; margin: 8px 0 0; }
.tl-date { font-size: 11px; color: var(--muted); white-space: normal; text-align: right; }
.timeline-toggle { padding: 8px 0 3px; margin-top: 7px; background: transparent; color: var(--accent); border: 0; cursor: pointer; font-size: 12px; }
.timeline-details { display: grid; grid-template-rows: 0fr; opacity: 0;  }
.timeline-details > div { overflow: hidden; }
.timeline-details.is-open { grid-template-rows: 1fr; opacity: 1; }
.timeline-details .bullets { display: grid; gap: 12px; margin-top: 20px; max-width: 65ch; list-style: disc; padding-left: 18px; }
.timeline-details .bullets li { padding-left: 3px; color: var(--muted); font-size: 15px; }

/* Role page mastheads. */
.page-head { position: relative; overflow: clip; padding: 52px 0 64px; }
.page-head > .wrap { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 24px var(--gap); padding-bottom: 36px; border: 0; }
.back { grid-column: 1 / -1; width: fit-content; font-size: 12px; color: var(--muted); }
.back:hover { color: var(--accent); text-decoration: underline; }
.page-head h1 { grid-column: 1 / 8; grid-row: 2 / 5; font-size: clamp(40px, 4.7vw, 68px); letter-spacing: -.01em; font-weight: 650; line-height: 1.1; }
.page-head .lead { grid-column: 9 / -1; grid-row: 2; font-size: 16px; color: var(--muted); max-width: 45ch; }
.page-head .btn-row { grid-column: 9 / -1; grid-row: 3; margin: 0; gap: 12px 20px; }
.page-head .btn { padding: 7px 0; border: 0; background: transparent; color: var(--ink); }
.switch { grid-column: 9 / -1; grid-row: 4; display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 12px; color: var(--muted); }
.switch > span { width: 100%; }

/* Case study evidence and numerical results. */
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; margin: 42px 0; }
.stat { display: flex; flex-direction: column; gap: 12px; padding: 0 22px; border: 0; min-width: 0; }
.stat:first-child { padding-left: 0; border: 0; }
.stat strong { font-size: clamp(30px,3.4vw,52px); line-height: 1.05; letter-spacing: 0; font-weight: 600; color: var(--ink); white-space: nowrap; }
.stat span { font-size: 13px; }
.stat small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.panel { padding: 28px 0; border: 0; min-width: 0; }
.panel h3 { font-size: clamp(23px,2.6vw,36px); font-weight: 600; line-height: 1.15; letter-spacing: 0; margin-bottom: 20px; }
.bookings-highlight { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: var(--gap); margin-top: 40px; border: 0; }
.bookings-highlight strong { display: flex; align-items: center; gap: 24px; font-size: 18px; line-height: 1.3; font-weight: 500; }
.booking-number { font-size: clamp(64px,7vw,100px); letter-spacing: 0; line-height: 1; font-weight: 600; }
.bookings-highlight .note { margin: 0; align-self: center; }
.bars { height: 250px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; border: 0; padding-top: 16px; margin: 28px 0 55px; }
.bar-col { flex: 1; position: relative; display: flex; height: 100%; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; }
.bar-val { font-size: 13px; margin-bottom: 10px; }
.bar { width: min(76px,100%); height: calc(var(--n) * 1.7px); background: var(--accent); transform: scaleY(0); transform-origin: bottom; transition: transform var(--dur-base) var(--ease-out); }
.panel.in .bar { transform: scaleY(1); }
.bar.partial { opacity: .55; }
.bar-lab { position: absolute; top: 100%; margin-top: 10px; white-space: nowrap; font-size: 11px; color: var(--muted); }
.bar-lab small { display: block; font-size: 10px; }
.table-wrap { overflow-x: auto; margin-top: 24px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; min-width: 580px; }
th, td { padding: 18px 18px 18px 0; vertical-align: top; border: 0; }
thead th { border: 0; font-weight: 500; font-size: 11px; text-transform: none; letter-spacing: 0; color: var(--muted); }
tbody th { font-weight: 600; }
tbody td { color: var(--muted); }
.did-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--gap); margin-top: 32px; }
.did { padding-top: 20px; border: 0; min-width: 0; }
.did h4 { font-size: 19px; font-weight: 600; letter-spacing: 0; margin-bottom: 14px; }
.did p { color: var(--muted); font-size: 14px; }
.callout { margin-top: 40px; padding: 24px 0 24px 24px; border: 0; font-size: 15px; max-width: 65ch; }
/* Screenshots retain their original pixels inside a plain surface frame. */
.testimonial-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--gap); margin-top: 36px; }
.testimonial, .client-review { margin: 0; padding-top: 24px; }
.client-review blockquote, .testimonial blockquote { margin: 24px 0 28px; font-size: clamp(18px,1.8vw,24px); line-height: 1.45; letter-spacing: 0; }
.client-review figcaption, .testimonial figcaption { display: grid; gap: 6px; font-size: 11px; text-transform: none; letter-spacing: 0; }
.client-review figcaption span, .testimonial figcaption span { color: var(--muted); }
.review-stars { display: inline-flex; gap: 5px; color: var(--accent); }
.review-stars svg { width: 16px; height: 16px; fill: currentColor; }
.client-reviews .note { margin-top: 30px; }

/* Project, skill and experience rows. */
.skill-grid { display: grid; margin-top: 30px; }
.skill { display: grid; grid-template-columns: minmax(120px, .3fr) minmax(0,1fr); gap: 24px; border: 0; padding: 24px 0; }
.skill h4 { font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: 0; padding-top: 3px; color: var(--muted); }
.skill .chips { margin: 0; line-height: 1.8; }
.exp { padding: 26px 0; border: 0; margin-top: 24px; }
.exp-head, .edu { display: flex; justify-content: space-between; align-items: start; gap: 24px; }
.exp-head h3, .edu h4 { font-size: 22px; font-weight: 600; letter-spacing: 0; }
.exp-head p, .edu p { color: var(--muted); font-size: 13px; margin-top: 12px; }
.experience-more { margin-top: 20px; }
.experience-more summary { width: fit-content; cursor: pointer; color: var(--accent); font-size: 13px; }
.experience-more .less-label, .experience-more[open] .more-label { display: none; }
.experience-more[open] .less-label { display: inline; }
.edu { padding: 24px 0; border: 0; }
.bullets { display: grid; gap: 12px; margin-top: 20px; max-width: 65ch; list-style: disc; padding-left: 18px; }
.bullets li { padding-left: 3px; color: var(--muted); font-size: 15px; }
.projects { display: grid; gap: 36px; margin-top: 36px; }
.project { padding-top: 30px; border: 0; min-width: 0; }
.project h3 { font-size: clamp(26px,3vw,42px); letter-spacing: 0; line-height: 1.1; font-weight: 600; max-width: 25ch; }
.project-body { position: relative; }
.project-img { width: 100%; height: auto; margin-bottom: 24px; }
.has-project-view > .project-view { position: absolute; top: 0; right: 0; }
.has-project-view > .meta, .has-project-view > h3 { padding-right: 100px; }
.project-view svg { width: 17px; height: 17px; }
.project .btn-row:empty { display: none; }
.work-steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: var(--gap); margin: 32px 0; padding: 0; list-style: none; }
.work-steps p { color: var(--muted); font-size: 14px; }

/* Natural-aspect imagery, text tabs, and existing gallery controls. */
.tabs { display: flex; flex-wrap: wrap; gap: 14px 24px; margin: 30px 0; }
.tab { border: 0; padding: 7px 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.tab.on, .tab:hover { color: var(--ink);  }
.masonry { columns: 3 200px; column-gap: 20px; }
.shot { display: block; width: 100%; break-inside: avoid; margin: 0 0 20px; padding: 0; border: 0; background: var(--surface); cursor: zoom-in; min-height: 120px;  }
.shot img { width: 100%; height: auto; }
.more { margin-top: 24px; }
.video-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px; margin-top: 32px; }
.video-frame { aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink); }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video figcaption { display: grid; gap: 8px; padding-top: 16px; font-size: 13px; }
.video figcaption strong { font-weight: 500; }
.video figcaption span { color: var(--muted); font-size: 11px; }
.video-watch { display: inline-block; margin-top: 14px; color: var(--accent); font-size: 12px; text-decoration: underline; }
.personal-photos { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.personal-photos img { width: 100%; height: auto; }
.personal-photos a { display: block; background: var(--surface); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: var(--paper); display: grid; place-items: center;  }
.lightbox[hidden] { display: none; }
.lb-stage { display: grid; place-items: center; width: 100%; height: 100%; padding: 56px 64px; }
#lb-img { max-width: 100%; max-height: 100%; opacity: 0; }
#lb-img.loaded { opacity: 1; transform: none; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 46px; height: 46px; border: 0; background: var(--paper); color: var(--ink); font-size: 22px; cursor: pointer; }
.lb-btn:hover {  }
#lb-close { top: 16px; right: 16px; }
#lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
#lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
#lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: var(--muted); font-size: 13px; }

/* Solid inverted contact block. Its contrast is the same in either direction. */
.cta { padding: 64px 0 80px; margin-top: 48px; color: var(--paper); background: var(--ink); }
.cta-box { padding-top: 26px; border: 0; text-align: left; }
.cta-box h2 { max-width: 14ch; font-size: clamp(52px,7.5vw,116px); line-height: 1; letter-spacing: 0; font-weight: 600; margin-bottom: 36px; }
.cta-box p { margin-top: 14px; font-size: 15px; }
.cta-box .btn-row { align-items: start; gap: 24px 48px; }
.cta-box .btn { color: inherit; border: 0; background: transparent; padding: 4px 0; font-size: 13px; }
.cta-box .btn.primary { display: flex; flex-direction: column; align-items: start; }
.contact-link-label { display: block; margin-bottom: 8px; }
.contact-link-value { display: block; font-size: clamp(20px,3vw,42px); letter-spacing: 0; font-weight: 400; overflow-wrap: anywhere; }
.cta-box .btn:hover { text-decoration: underline; }
.cta-box .contact-phone { font-size: 12px; }
.link-row { display: flex; flex-wrap: wrap; gap: 18px 32px; margin-top: 36px; padding-top: 24px; border: 0; font-size: 12px; }
.link-row a:hover { text-decoration: underline; }
.cta :focus-visible { outline-color: var(--inverse-accent); }
.foot-in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding: 26px 0; border: 0; color: var(--muted); font-size: 11px; }
.totop:hover { color: var(--accent); text-decoration: underline; }

/* Preview windows retain their controls and responsive screenshot sizing. */
.project-preview-dialog { width: min(1200px,calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: clamp(20px,3vw,40px); border: 0; background: var(--paper); color: var(--ink); overflow-y: auto; }
.project-preview-dialog::backdrop { background: var(--ink); opacity: .75; }
.project-preview-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 32px; }
.project-preview-header h2 { font-size: clamp(20px,3vw,36px); font-weight: 600; letter-spacing: 0; }
.project-preview-header .btn { flex-shrink: 0; }
.project-preview-devices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px; align-items: start; }
.project-preview-devices.single-preview { grid-template-columns: minmax(0,1fr); }
.project-device-preview { min-width: 0; }
.project-device-preview figcaption { margin-top: 18px; font-size: 11px; text-align: center; color: var(--muted); }
.project-device-preview figcaption a { text-decoration: underline; }
.device-frame { position: relative; margin-inline: auto; padding: 8px; border: 0; background: var(--surface); }
.device-frame img { display: block; width: 100%; height: auto; }
.device-laptop { width: 94%; padding-top: 14px; }
.device-laptop-base { width: 100%; height: 8px; border: 0; background: var(--surface); }
.device-iphone { width: min(100%,260px); padding: 6px; }
.device-iphone a { display: block; aspect-ratio: 390 / 844; overflow: hidden; background: var(--paper); }
.device-iphone img { width: 100%; height: 100%; object-fit: cover; }
.device-iphone::before { content: ''; position: absolute; top: 6px; left: 30%; width: 40%; height: 16px; background: var(--ink); pointer-events: none; }
.phone-hardware { pointer-events: none; }
.phone-home { position: absolute; bottom: 12px; left: 34%; width: 32%; height: 3px; background: var(--ink); }
.preview-browser { font: 11px/1.4 Inter,Arial,sans-serif; background: var(--surface); color: var(--ink); }
.preview-browser-tabs, .preview-browser-toolbar { display: flex; align-items: center; gap: 12px; padding: 8px; }
.preview-browser-tab { display: flex; justify-content: space-between; gap: 20px; padding: 4px; border: 0; }
.preview-browser-window { margin-left: auto; white-space: nowrap; }
.preview-browser-address { flex: 1; min-width: 0; padding: 4px 8px; overflow: hidden; text-overflow: ellipsis; background: var(--paper); color: var(--muted); }

/* Existing reveal, expand and modal animation behavior. */
.reveal { opacity: 1; transform: none; }
.js-motion .reveal:not(.in) { opacity: 0; transform: translateY(12px); }
.js-motion .reveal { transition: opacity var(--dur-enter) var(--ease-out), transform var(--dur-enter) var(--ease-out); }
.js-motion .reveal.reveal-left:not(.in) { transform: translate(-12px,8px); }
.js-motion .reveal.reveal-right:not(.in) { transform: translate(12px,8px); }
.reveal.in { opacity: 1; transform: none; }
.portrait-pending { opacity: 0; }
@keyframes preview-open { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }
@keyframes preview-close { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(.95); } }
@keyframes preview-device-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.project-preview-dialog[open] { animation: preview-open var(--dur-base) var(--ease-out) both; }
.project-preview-dialog[open]:not(.is-closing) .project-device-preview { animation: preview-device-in var(--dur-fast) var(--ease-out) calc(min(var(--preview-order,0), 5) * var(--stagger)) both; }
.project-preview-dialog.is-closing { animation: preview-close calc(var(--dur-base) * .8) var(--ease-in-out) both; }

/* Responsive grids and mobile navigation. */
@media (max-width: 1100px) {
  .nav-in { min-height: 72px; }
  .burger { display: grid; }
  .links { position: absolute; left: 0; right: 0; top: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 12px var(--gutter) 24px; border: 0; background: var(--paper); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: none; }
  .links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-pages { display: grid; gap: 0; }
  .links a { display: block; padding-block: 18px; border: 0; }
    .nav-actions { display: flex; flex-direction: row-reverse; justify-content: space-between; margin-top: 8px; gap: 20px; }
  .nav-actions .nav-contact { flex: 1; }
  .hero h1 { font-size: clamp(56px,9.5vw,110px); }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 30px 0; }
  .stat:nth-child(3) { border: 0; padding-left: 0; }
  .stat strong { font-size: 42px; }
  .did-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .work-steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 899px) {
  .hero-copy { grid-column: 1 / -1; }
  .hero-portrait { grid-column: 1 / 7; margin-top: 8px; max-width: 420px; }
  .hero h1 { font-size: clamp(56px,11vw,100px); max-width: 13ch; }
    .section { padding: 30px 0 48px; }
        .section-title { font-size: clamp(32px,6vw,48px); }
  .page-head { padding-top: 32px; }
  .page-head > .wrap { display: block; }
    .page-head h1 { max-width: 17ch; font-size: clamp(40px,7vw,64px); }
  .page-head .lead { margin-top: 28px; max-width: 65ch; }
  .page-head .btn-row { margin-top: 28px; }
  .switch { margin-top: 26px; }
  .switch > span { width: auto; }
  .about-grid, .two-col { grid-template-columns: minmax(0,1fr); gap: 48px; }
}
@media (max-width: 540px) {
  body { font-size: 16px; }
  .brand { font-size: 15px; }
  .hero h1 { font-size: 56px; letter-spacing: 0; }
  .hero .lead { margin-top: 28px; }
  .hero-portrait { grid-column: 1 / 10; width: 100%; }
      .role-card { grid-template-columns: 26px minmax(0,1fr) 22px; column-gap: 16px; row-gap: 16px; padding: 26px 0; }
  .role-card h3 { grid-column: 2; padding-right: 10px; }
  .role-card p,   .role-go { grid-column: 2; }
    .bookings-highlight { grid-template-columns: minmax(0,1fr); gap: 22px; }
  .stat { padding-inline: 16px; }
  .stat strong { font-size: 34px; }
  .stats { gap: 28px 0; }
  .did-grid, .testimonial-grid, .video-grid, .project-preview-devices { grid-template-columns: minmax(0,1fr); }
  .skill { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .tl-item { grid-template-columns: 6px minmax(0,1fr); }
  .tl-date { grid-column: 2; grid-row: 2; text-align: left; }
  .timeline-details .bullets { padding-top: 8px; }
  .exp-head, .edu { flex-direction: column; gap: 14px; }
  .has-project-view > .meta { padding-right: 90px; }
  .has-project-view > h3 { padding-right: 0; margin-top: 32px; }
  .project-view { padding: 7px 11px; }
  .personal-photos { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lb-stage { padding: 56px 12px; }
  .preview-browser { font-size: 9px; }
  .preview-browser-tabs, .preview-browser-toolbar { padding: 5px; gap: 6px; }
  .project-preview-header { gap: 16px; }
  .project-preview-header h2 { font-size: 20px; }
  .cta-box h2 { font-size: 52px; }
  .cta-box .btn-row { flex-direction: column; gap: 26px; }
}
html:not(.js-motion) .timeline-toggle, html:not(.js-motion) .theme, html:not(.js-motion) .burger { display: none; }
html:not(.js-motion) .timeline-details { grid-template-rows: 1fr; opacity: 1; }
html:not(.js-motion) .bar { transform: scaleY(1); }
@media (max-width: 1100px) {
  html:not(.js-motion) .nav-in { flex-wrap: wrap; padding-block: 16px; }
  html:not(.js-motion) .links { position: static; width: 100%; padding: 0; opacity: 1; visibility: visible; transform: none; border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js-motion .reveal:not(.in), .js-motion .reveal.reveal-left:not(.in), .js-motion .reveal.reveal-right:not(.in) { opacity: 1; transform: none; }
      .portrait-pending { opacity: 1; }
  .panel .bar { transform: scaleY(1); }
}

/* Original intro geometry, sequence and timings; theme colors only. */
.site-intro { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background-color: var(--paper); background-image: linear-gradient(color-mix(in srgb, var(--rule) 25%, transparent) 1px, transparent 1px), linear-gradient(90deg,color-mix(in srgb, var(--rule) 25%, transparent) 1px,transparent 1px); background-size: 36px 36px; animation: intro-aperture var(--intro-opening) ease-in-out calc(var(--intro-traces) + var(--intro-merge)) forwards; }
.intro-art { width: min(600px, 95vw); height: auto; }
.intro-traces path { stroke-dasharray: 420; stroke-dashoffset: 420; animation: intro-trace var(--intro-traces) ease-out forwards; }
.intro-node { stroke: var(--ink); stroke-width: 1.8; fill: var(--paper); transform-box: view-box; opacity: 0; }
.intro-node-seo { animation: intro-node-in var(--intro-traces) var(--ease) forwards, intro-seo var(--intro-merge) var(--ease) var(--intro-traces) forwards; }
.intro-node-dev { animation: intro-node-in var(--intro-traces) var(--ease) forwards, intro-dev var(--intro-merge) var(--ease) var(--intro-traces) forwards; }
.intro-node-camera { animation: intro-node-in var(--intro-traces) var(--ease) forwards, intro-camera var(--intro-merge) var(--ease) var(--intro-traces) forwards; }
.intro-monogram { opacity: 0; transform-origin: 300px 180px; animation: intro-logo var(--intro-merge) var(--ease) var(--intro-traces) forwards; }
.intro-skip { position: fixed; z-index: 201; right: 24px; top: 24px; border: 1px solid var(--ink); border-radius: 999px; padding: 8px 20px; color: var(--ink); background: var(--paper); font: 16px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; cursor: pointer; }
@keyframes intro-trace { to { stroke-dashoffset: 0; } }
@keyframes intro-node-in { from { opacity: 0; } 65%, to { opacity: 1; } }
@keyframes intro-seo { from { opacity: 1; transform: none; } 70%, to { opacity: 0; transform: translate(170px,80px) scale(.98); } }
@keyframes intro-dev { from { opacity: 1; transform: none; } 70%, to { opacity: 0; transform: translate(-170px,80px) scale(.98); } }
@keyframes intro-camera { from { opacity: 1; transform: none; } 70%, to { opacity: 0; transform: translateY(-100px) scale(.98); } }
@keyframes intro-logo { from { opacity: 0; transform: scale(.85); } 70%, to { opacity: 1; transform: scale(1); } }
@keyframes intro-aperture { from { clip-path: polygon(evenodd, 0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,50.00% 50.00%,0% 0%); } 100% { clip-path: polygon(evenodd, 0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,200.00% 50.00%,198.15% 73.47%,192.66% 96.35%,183.65% 118.10%,171.35% 138.17%,156.07% 156.07%,138.17% 171.35%,118.10% 183.65%,96.35% 192.66%,73.47% 198.15%,50.00% 200.00%,26.53% 198.15%,3.65% 192.66%,-18.10% 183.65%,-38.17% 171.35%,-56.07% 156.07%,-71.35% 138.17%,-83.65% 118.10%,-92.66% 96.35%,-98.15% 73.47%,-100.00% 50.00%,-98.15% 26.53%,-92.66% 3.65%,-83.65% -18.10%,-71.35% -38.17%,-56.07% -56.07%,-38.17% -71.35%,-18.10% -83.65%,3.65% -92.66%,26.53% -98.15%,50.00% -100.00%,73.47% -98.15%,96.35% -92.66%,118.10% -83.65%,138.17% -71.35%,156.07% -56.07%,171.35% -38.17%,183.65% -18.10%,192.66% 3.65%,198.15% 26.53%,200.00% 50.00%,0% 0%); } }
@media (prefers-reduced-motion: reduce) { .site-intro, .intro-skip { display: none; } }



/* The personal page retains its existing heading hierarchy. */
body[data-view="about"] .page-head > .wrap { display: block; }
body[data-view="about"] .page-head h2 { margin-top: 24px; font-size: 30px; font-weight: 500; letter-spacing: 0; }
body[data-view="about"] .page-head .lead { margin-top: 24px; }

.cta-box a.btn { display: flex; flex-direction: column; align-items: flex-start; }

/* Theme changes cross-fade; ordinary page navigation keeps its existing timing. */
:root.theme-changing::view-transition-old(root),
:root.theme-changing::view-transition-new(root) {
  animation-duration: var(--dur-base);
  animation-timing-function: var(--ease-in-out);
}


/* Controls and content use spacing rather than outlined containers. */
body { letter-spacing: 0; }
em, i { font-style: normal; }
h2, h3, h4 { letter-spacing: 0; font-weight: 600; }
.btn, .theme, .burger, .lb-btn { border-radius: var(--radius); background: var(--surface); }
.btn.primary { background: var(--accent); color: var(--paper); }
.btn:hover, .theme:hover, .burger:hover, .lb-btn:hover { color: var(--accent); }
.btn.primary:hover { color: var(--paper); text-decoration: underline; }
.hero .btn { padding: 12px 18px; font-size: 15px; }
.hero .btn.primary { background: var(--accent); color: var(--paper); text-decoration: underline; }
.hero .btn.ghost { background: var(--surface); color: var(--ink); }
.link-arrow { margin-left: 8px; }
.links a { font-size: 14px; }
.theme, .burger { background: var(--surface); }
.hero-portrait { margin-top: 12px; }
.section { padding-block: 56px; }
.cards { margin-top: 24px; }
.role-card + .role-card { margin-top: 20px; }
.role-go:hover { color: var(--ink); }
.about-grid, .two-col { gap: 64px; }
.section-sub { margin-bottom: 28px; }
.about-hint { background: var(--surface); border-radius: var(--radius); transform: none; transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.tl-item { grid-template-columns: minmax(0,1fr) minmax(80px,auto); gap: 20px; }
.timeline-toggle { text-decoration: underline; font-size: 14px; }
.page-head { padding-bottom: 24px; }
.page-head > .wrap { padding-bottom: 0; }
.page-head .btn { background: transparent; text-decoration: underline; }
.switch a { color: var(--accent); text-decoration: underline; }
.stats { gap: 28px; }
.stat, .stat:first-child { padding: 0; }
.stat strong { letter-spacing: 0; }
.panel { padding-block: 24px; }
.panel h3 { font-size: clamp(23px,2.3vw,30px); }
.bookings-highlight { background: var(--surface); padding: 24px; border-radius: var(--radius); }
.booking-number { letter-spacing: -.01em; }
.bar.partial { opacity: 1; background: var(--muted); }
th, td { border-bottom: 1px solid var(--rule); }
thead th { font-size: 13px; font-weight: 600; }
.did-grid { gap: 32px 40px; }
.callout { padding: 0; color: var(--muted); }
.client-review, .testimonial { padding: 24px; background: var(--surface); border-radius: var(--radius); }
.client-review figcaption, .testimonial figcaption { font-size: 14px; }
.client-review blockquote { font-size: 20px; letter-spacing: 0; }
.skill { padding-block: 18px; }
.skill h4 { font-size: 15px; font-weight: 600; color: var(--ink); }
.project .chips { font-size: 14px; }
.project { padding-block: 12px 24px; }
.project h3 { font-size: clamp(26px,2.6vw,36px); }
.project .meta { font-size: 14px; font-weight: 400; }
.project h3 + .meta { margin: 14px 0 0; }
.has-project-view > h3 { padding-right: 100px; }
.exp-head h3, .edu h4 { font-size: 22px; }
.exp { margin-top: 16px; padding-block: 20px; }
.work-steps { list-style: disc; padding-left: 18px; gap: 28px 40px; }
.tab { font-size: 15px; }
.tab.on, .tab:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.cta-box { padding-top: 0; }
.cta-box h2 { font-size: clamp(40px,5.5vw,76px); line-height: 1.1; letter-spacing: -.01em; }
.cta-box .btn { border-radius: 0; background: transparent; color: inherit; }
.cta-box .btn.primary:hover { color: inherit; }
.cta-box .contact-phone { display: none; }
.contact-link-label { font-size: 14px; }
.contact-link-value { letter-spacing: 0; font-size: clamp(20px,2.5vw,36px); }
.project-preview-dialog, .device-frame { border-radius: var(--radius); }
.project-preview-dialog { border: 0; }
.device-frame, .device-laptop-base { background: var(--surface); }
.device-laptop-base { border-radius: 0 0 6px 6px; }
.device-iphone::before { height: 6px; top: 0; }
.phone-home { display: none; }
.lb-btn { background: var(--surface); }
@media (max-width: 1100px) {
  .links a { border: 0; }
  .stats { gap: 28px; }
}
@media (max-width: 899px) {
  .hero-portrait { grid-column: 1 / 7; }
  .section { padding-block: 40px; }
  .about-grid, .two-col { gap: 44px; }
}
@media (max-width: 540px) {
  .hero h1 { letter-spacing: -.01em; }
  .hero-portrait { grid-column: 1 / 10; }
  .role-card { display: flex; flex-direction: column; gap: 16px; }
  .role-card h3 { padding: 0; }
  .role-card + .role-card { margin-top: 12px; }
  .role-card p { font-size: 16px; }
  .role-go { font-size: 15px; }
  .tl-item { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .tl-date { grid-column: 1; grid-row: auto; }
  .bookings-highlight { display: block; }
  .bookings-highlight .note { margin-top: 18px; }
  .stats { gap: 28px 20px; }
  .stat { padding: 0; }
  .stat strong { font-size: 30px; }
  .has-project-view > h3 { padding-right: 86px; margin-top: 0; font-size: 26px; }
  .work-steps { grid-template-columns: minmax(0,1fr); }
  .cta-box h2 { font-size: 44px; }
}

.page-head .btn.primary { background: transparent; color: var(--accent); }
.cta-box .btn:hover { color: inherit; }

/* Shared motion. Layout values change instantly; only painted layers tween. */
.nav { view-transition-name: site-header; }
.links a.nav-contact { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: 6px; background: transparent; color: var(--ink); text-decoration: none; }
.links a.nav-contact:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
::view-transition-group(site-header), ::view-transition-new(site-header) { animation: none; }
::view-transition-old(site-header) { display: none; }
:root.theme-changing .nav { view-transition-name: none; }
:root.theme-changing [style*="view-transition-name"] { view-transition-name: none !important; }
::view-transition-group(portfolio-title) { animation-duration: var(--dur-base); animation-timing-function: var(--ease-in-out); }
::view-transition-old(portfolio-title), ::view-transition-new(portfolio-title) { animation-duration: var(--dur-base); animation-timing-function: var(--ease-in-out); }
:root[data-shared-role="seo"] body[data-view="home"] .role-card[data-role="seo"] h3,
:root[data-shared-role="dev"] body[data-view="home"] .role-card[data-role="dev"] h3,
:root[data-shared-role="multimedia"] body[data-view="home"] .role-card[data-role="multimedia"] h3,
:root[data-shared-role="seo"] body[data-view="seo"] .page-head h1,
:root[data-shared-role="dev"] body[data-view="dev"]:not([data-case-study]) .page-head h1,
:root[data-shared-role="multimedia"] body[data-view="multimedia"] .page-head h1 { view-transition-name: portfolio-title; }
:root.theme-changing .page-head h1 { view-transition-name: none !important; }
.hero-pending { opacity: 0; transform: translateY(10px); }
.icon-toggle { position: relative; }
.icon-toggle > .icon-off, .icon-toggle > .icon-on { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), filter var(--dur-fast) var(--ease-out); }
.icon-toggle > .icon-on, .icon-toggle.icon-is-on > .icon-off { opacity: 0; filter: blur(2px); transform: scale(.9); }
.icon-toggle > .icon-off, .icon-toggle.icon-is-on > .icon-on { opacity: 1; filter: blur(0); transform: scale(1); }
.burger svg { width: 20px; height: 20px; }
.timeline-toggle { display: inline-flex; align-items: center; gap: 4px; }
.toggle-mark { display: inline-block; width: 12px; height: 16px; }
.toggle-label, .copy-label { position: relative; display: inline-block; }
.text-outgoing { position: absolute; left: 0; top: 0; width: max-content; pointer-events: none; }
.tl-item { position: relative; }
.timeline-details > div, .timeline-exit { transform-origin: top left; }
.timeline-exit { z-index: 1; }
.about-hint { transform-origin: bottom left; transform: scale(.95); }
.about-discover:hover .about-hint, .about-discover:focus-visible .about-hint { transform: scale(1); }
.tabs { position: relative; }
.tabs.has-indicator .tab.on { text-decoration: none; }
.tab-indicator { position: absolute; height: 1px; background: var(--accent); transform-origin: left center; pointer-events: none; }
.masonry { position: relative; }
.gallery-outgoing .shot, .gallery-outgoing img { animation: none; transition: none; }
.lb-stage { position: relative; }
.lb-outgoing { z-index: 0; }
.lightbox .lb-btn, #lb-count { z-index: 1; }
.btn, .theme, .burger, .tab, .role-card, .shot, .lb-btn, .timeline-toggle, .thesis-carousel-arrow { transition: transform var(--dur-fast) var(--ease-out); }
.role-card { transform-origin: center left; }
.js-motion .role-card.reveal.in { transition: opacity var(--dur-enter) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.btn:active, .theme:active, .burger:active, .tab:active, .role-card:active, .shot:active, .lb-btn:active, .timeline-toggle:active, .thesis-carousel-arrow:active { transform: scale(.97); transition-duration: 0ms; transition-delay: 0ms !important; }
#lb-prev:active, #lb-next:active { transform: translateY(-50%) scale(.97); }
@media (max-width: 1100px) { .links { transform: scale(.95); transition: none; transform-origin: right top; } .links.open { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .hero-pending { opacity: 1; transform: none; }
  .btn:active, .theme:active, .burger:active, .tab:active, .role-card:active, .shot:active, .lb-btn:active, .timeline-toggle:active, .thesis-carousel-arrow:active { transform: none; }
  #lb-prev:active, #lb-next:active { transform: translateY(-50%); }
  .icon-toggle > .icon-off, .icon-toggle > .icon-on { transform: none !important; filter: none !important; }
  .nav, .page-head h1, .role-card h3 { view-transition-name: none !important; }
  .about-hint, .about-discover:hover .about-hint, .about-discover:focus-visible .about-hint { transform: none; }
}

.js-motion .role-card.reveal.in:active { transform: scale(.97); transition-duration: 0ms; transition-delay: 0ms !important; }
@media (prefers-reduced-motion: reduce) { .js-motion .role-card.reveal.in:active { transform: none; } }

.about-hint { transition: none; }
.about-hint.hint-visible { visibility: visible; opacity: 1; transform: scale(1); }

/* Restore the original project/portfolio containers without old shadows or pills. */
.projects { gap: 24px; }
.project { display: grid; grid-template-columns: minmax(0,1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0; overflow: hidden; }
.project-body { --project-padding: clamp(24px, 4vw, 38px); padding: var(--project-padding); }
.project-img { margin-bottom: 0; }
.has-project-view > .project-view { top: var(--project-padding); right: var(--project-padding); }
.has-project-view > h3 { padding-right: 108px; }
.has-project-view > .meta { padding-right: 0; }
.project-view.btn { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); padding: 8px 14px; }
.project-view.btn:hover { border-color: var(--accent); color: var(--accent); }
.role-card { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.tool-logo { display: inline-block; width: 16px; height: 16px; flex-shrink: 0; object-fit: contain; }
/* Original monochrome SVG marks follow the theme; colored raster marks stay intact. */
.tool-logo[src$=".png"], .tool-logo[src$=".webp"], .tool-logo[src$="/bing.svg"], .tool-logo[src$="/visualstudiocode.svg"], .tool-logo[src$="/microsoftcopilot.svg"] { filter: none; }
.tool-logo[src$="/grandranker.webp"] { filter: var(--logo-filter); }
@media (max-width: 540px) {
  .role-card { padding: 22px; }
  .project-body { --project-padding: 20px; }
  .project-body.has-project-view { display: flex; flex-direction: column; align-items: stretch; }
  .project-body.has-project-view > h3 { order: 0; padding-right: 0; margin-top: 0; }
  .project-body.has-project-view > .project-view { position: static; order: 1; align-self: flex-start; margin-top: 16px; }
  .project-body.has-project-view > .meta { order: 2; }
  .project-body.has-project-view > .chips { order: 3; }
  .project-body.has-project-view > .bullets { order: 4; }
  .project-body.has-project-view > .btn-row { order: 5; }
}

/* Reinforce thin original strokes without a blur or a replacement asset. */
.tool-logo[src$="/capcut.svg"], .tool-logo[src$="/recharts.svg"] { filter: var(--logo-filter) drop-shadow(0 0 0 var(--ink)) drop-shadow(0 0 0 var(--ink)); }
.tool-logo[src$="/recharts.svg"] { object-fit: cover; object-position: 70% center; }

/* Shared contained buttons and compact SEO charts. */
:root { --cta: #c2410c; --cta-hover: #9a3412; --cta-ink: #ffffff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --cta: #fb923c; --cta-hover: #fdba74; --cta-ink: #1a0f05; }
}
:root[data-theme="dark"] { --cta: #fb923c; --cta-hover: #fdba74; --cta-ink: #1a0f05; }
.btn, .btn.ghost, .btn.primary, .project-view.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 1.5px solid var(--ink); border-radius: 6px; background: transparent; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.25; text-align: center; text-decoration: none; white-space: normal; cursor: pointer; transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), border-color 160ms var(--ease-out), transform 160ms var(--ease-out); }
.btn--primary, .btn.primary { border-color: var(--accent); background: var(--accent); color: var(--paper); }
:root:not([data-theme="dark"]) .btn--primary, :root:not([data-theme="dark"]) .btn.primary { color: #fff; }
.btn--primary:hover, .btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
:root:not([data-theme="dark"]) .btn--primary:hover, :root:not([data-theme="dark"]) .btn.primary:hover { color: #fff; }
.btn--secondary, .btn.ghost, .project-view.btn { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn--secondary:hover, .btn.ghost:hover, .project-view.btn:hover { background: var(--surface); border-color: var(--ink); color: var(--ink); text-decoration: none; }
.btn--cta, .btn--cta:hover { border-color: var(--cta); background: var(--cta); color: var(--cta-ink); }
.btn--cta:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
.btn--sm { min-height: 36px; padding-inline: 14px; font-size: 13px; }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme, .burger, .lb-btn, .thesis-carousel-arrow { border: 1.5px solid var(--ink); background: var(--paper); }
.tab { min-height: 40px; border: 1px solid var(--rule); border-radius: 6px; padding: 0 14px; }
.hero .btn, .page-head .btn, .cta-box .btn { padding-inline: 20px; border-width: 1.5px; text-decoration: none; }
.hero .btn.btn--primary, .hero .btn.btn--primary[href="#portfolios"] { border-color: var(--accent); background: var(--accent); color: var(--paper); }
.hero .btn.btn--secondary { border-color: var(--ink); background: transparent; color: var(--ink); }
.hero .btn.btn--secondary:hover { background: var(--surface); }
.cta-box .btn { color: var(--paper); }
.cta-box .btn--secondary { border-color: var(--paper); color: var(--paper); }
.cta-box .btn--secondary:hover { background: color-mix(in srgb, var(--paper) 12%, transparent); border-color: var(--paper); color: var(--paper); }
.cta-box .btn--primary { color: var(--paper); }
.cta-box .btn.btn--primary { border-color: var(--accent); background: var(--accent); color: var(--paper); }
.cta-box .btn.btn--primary:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.cta-box .btn--cta { color: var(--cta-ink); }
.cta-box .btn-row { flex-direction: row; flex-wrap: wrap; gap: 12px; }
.hero .btn-row, .page-head .btn-row, .btn-row { gap: 12px; flex-wrap: wrap; }
.role-go { grid-column: 2; justify-self: start; width: fit-content; }
.switch { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.switch > span { margin-right: 4px; }
.bookings-line { margin-top: 30px; font-size: 14px; }
.seo-did-list { display: grid; gap: 12px; }
.seo-did-list li { padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.seo-skills-line { margin-top: 24px; }
.client-review blockquote .review-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.client-review details[open] .review-clamp { display: block; }
.client-review details summary { width: fit-content; margin-top: 8px; color: var(--accent); cursor: pointer; font-size: 13px; }
.client-review details[open] summary { margin-bottom: 8px; }
.client-review .review-less { display: none; }
.client-review details[open] .review-more { display: none; }
.client-review details[open] .review-less { display: inline; }
.client-review .review-full { display: none; }
.client-review details[open] .review-full { display: block; }
.seo-chart-block { padding: 24px 0; margin-top: 32px; background: transparent; border-radius: 0; border-block: 1px solid var(--rule); }
.seo-chart-block h3 { margin-bottom: 18px; font-size: 20px; font-weight: 600; }
.chart-tabs { display: inline-flex; gap: 4px; margin: 0 0 20px; padding: 3px; border: 1px solid var(--rule); border-radius: 6px; }
.chart-tab { min-height: 36px; padding: 0 14px; border: 0; border-radius: 4px; background: transparent; color: var(--ink); cursor: pointer; }
.chart-tab.is-active { background: var(--surface); }
.chart-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.seo-native-chart { position: relative; width: 100%; overflow: visible; }
.seo-native-chart svg { width: 100%; height: auto; overflow: visible; }
.seo-grid { stroke: var(--rule); stroke-width: 1; }
.seo-axis, .seo-row-label { fill: var(--muted); font: 18px Inter, Arial, sans-serif; }
.seo-value { fill: var(--ink); font: 18px Inter, Arial, sans-serif; }
.seo-baseline { stroke: var(--rule-strong); stroke-width: 1; }
.seo-week-bar { cursor: crosshair; outline: none; }
.seo-week-bar:focus-visible rect { stroke: var(--ink); stroke-width: 2; }
.seo-bar { fill: var(--accent); transform-box: fill-box; transform-origin: center bottom; }
.seo-bar.is-partial { fill: url(#partial-hatch); }
.seo-bar.horizontal { transform-origin: left center; }
.chart-ready:not(.chart-drawn) .seo-bar:not(.horizontal) { transform: scaleY(0); }
.chart-ready:not(.chart-drawn) .seo-bar.horizontal { transform: scaleX(0); }
.chart-drawn .seo-bar:not(.horizontal) { transform: scaleY(var(--bar-scale, 1)); }
.chart-drawn .seo-bar.horizontal { transform: scaleX(var(--bar-scale, 1)); }
.chart-chart-switching .seo-bar { transition-duration: 400ms; }
.chart-ready:not(.chart-drawn) .seo-bar { transform: scaleY(0); }
.chart-drawn .seo-bar { transition: transform 600ms var(--ease-out); transition-delay: var(--bar-delay, 0ms); }
.seo-week-bar rect { transform-origin: center bottom; }
.seo-bar.is-highlight { fill: var(--accent); }
.seo-bar.is-muted { fill: var(--muted); }
.seo-tooltip { position: absolute; inset: auto auto 0 0; padding: 8px 10px; background: var(--paper); border: 1px solid var(--rule); color: var(--ink); font-size: 13px; pointer-events: none; }
.seo-tooltip[hidden] { display: none; }
.chart-caption, .seo-ai-summary { margin-top: 14px; font-size: 14px; }
.seo-ai-charts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 32px; }
.seo-small-chart { min-width: 0; margin-top: 20px; }
.seo-small-chart svg { overflow: visible; }
.seo-horizontal-row { outline: none; }
.seo-horizontal-row:focus-visible rect { stroke: var(--ink); stroke-width: 2; }
.seo-result-group { margin-block: 56px; }
.thesis-summary { margin-bottom: 20px; font-size: 16px; font-weight: 600; }
.thesis-accordion { margin-top: 18px; padding: 16px 0; border-block: 1px solid var(--rule); }
.thesis-accordion > summary { width: fit-content; cursor: pointer; font-size: 18px; font-weight: 600; }
.thesis-accordion[open] > summary { margin-bottom: 18px; }
.thesis-formula-details { margin-block: 22px; }
.thesis-validation-details .thesis-results-copy { margin-top: 16px; }
@media (max-width: 540px) {
  .seo-ai-charts { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .seo-chart-block { padding: 20px 0; }
  .seo-axis, .seo-value { font-size: 30px; }
  .seo-row-label { font-size: 24px; }
  .seo-small-chart svg { width: 100%; }
  .seo-row-label { font-size: 13px; }
  .role-go { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .chart-ready .seo-bar { transform: none !important; transition: none !important; }
  .btn { transition: none; }
  .btn:active { transform: none; }
}

/* Restored HEAD separators; keep the current typography, boxes and motion. */
.nav { border-bottom: 1px solid var(--rule); }
.section > .wrap { border-top: 1px solid var(--rule); padding-top: 32px; }
.page-head > .wrap { border-bottom: 1px solid var(--rule); padding-bottom: 36px; }
.hero-meta, .facts > div, .tl-item, .panel, .did, .skill, .exp, .edu,
.work-facts { border-top: 1px solid var(--rule); }
.timeline-toggle { border-bottom: 1px solid var(--rule); }
.stat { border-left: 1px solid var(--rule); padding: 0 22px; }
.stat:first-child { border-left: 0; padding: 0 22px 0 0; }
.bookings-highlight { border-block: 1px solid var(--rule); }
.bars { border-bottom: 1px solid var(--rule); }
thead th { border-top: 1px solid var(--rule); }
.callout { border-left: 1px solid var(--rule); padding: 24px 0 24px 24px; }
.panel:not(.bookings-highlight):not(.client-review):not(.testimonial) { padding-block: 28px; }
.cta-box { border-top: 1px solid var(--rule); padding-top: 26px; }
.link-row, .foot-in { border-top: 1px solid var(--rule); }
/* Chooser and project boxes already supply their original top boundary. */
@media (max-width: 1100px) {
  .links { border-bottom: 1px solid var(--rule); }
  .links a { border-bottom: 1px solid var(--rule); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 899px) {
  .section > .wrap { padding-top: 22px; }
}
@media (max-width: 1100px) {
  html:not(.js-motion) .links { border: 0; }
}

/* One boundary where the process panel is the section's only child. */
.how-i-work > .wrap > .panel { border-top: 0; }

@media (max-width: 540px) {
  .stat, .stat:first-child { padding-inline: 16px; }
  .stat:first-child, .stat:nth-child(3) { padding-left: 0; }
}

/* Current native groups replace HEAD's three ruled Search Console panels. */
.seo-result-group:has(#seo-weekly, #performance-title, #indexing-title) {
  border-top: 1px solid var(--rule); padding-top: 28px;
}
