:root {
  --bg: #0b0f0e;
  --card: #131a18;
  --border: #24302d;
  --text: #f3f4f6;
  --muted: #a7b2af;
  --accent: #22c55e;
  --accent-text: #22c55e;
  --on-accent: #06210f;
  --highlight: #ef4444;
  --danger-text: #f87171;
  --field: #5b6c67;
  --grad-1: #22c55e;
  --grad-2: #a7f3d0;
  --radius: 14px;
  --space: clamp(1.25rem, 5vw, 2rem);
  --header: 4.25rem;
  --head-font: 'JetBrains Mono', ui-monospace, monospace;
  --body-font: 'Inter', system-ui, sans-serif;
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #f7f9f8;
  --card: #ffffff;
  --border: #d8e0dd;
  --text: #101614;
  --muted: #4b5955;
  --accent-text: #15703a;
  --highlight: #c52b2b;
  --danger-text: #c52b2b;
  --field: #75857f;
  --grad-1: #15703a;
  --grad-2: #0f9d6b;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header); }
body { background: var(--bg); color: var(--text); font: 400 1rem/1.65 var(--body-font); }
h1, figcaption, .logo { font-family: var(--head-font); }
a { color: var(--accent-text); text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.fill { fill: currentColor; stroke: none; }

.wrap { width: min(72rem, 100% - 2 * var(--space)); margin-inline: auto; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 30; background: var(--accent); color: var(--on-accent); padding: .5rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; }

.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; gap: 1rem; min-height: var(--header); }
.logo { color: var(--text); font-weight: 700; font-size: 1.05rem; margin-right: auto; }
.logo span { color: var(--accent-text); }
.header-actions { display: flex; align-items: center; gap: .5rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.5rem; border-radius: 10px; border: 1px solid transparent; font-weight: 600; transition: transform .2s, box-shadow .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-small { min-height: 2.5rem; padding: 0 1rem; font-size: .9rem; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { box-shadow: 0 8px 24px rgb(34 197 94 / .3); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--card); }
.btn-ghost:hover { border-color: var(--accent); }

.icon-btn { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; }
.icon-btn:hover { border-color: var(--accent); }
:root[data-theme='dark'] .moon, :root[data-theme='light'] .sun { display: none; }

/* Mobile first: the menu is a dropdown panel. Without JavaScript it wraps under the header. */
.site-nav { order: 3; width: 100%; padding-bottom: .75rem; }
.header-row { flex-wrap: wrap; }
.site-nav a { display: block; padding: .6rem 0; color: var(--muted); font-weight: 500; font-size: .95rem; }
.site-nav a:hover { color: var(--text); }
.menu-btn { display: none; }
.js .menu-btn { display: inline-grid; }
.js .site-nav { display: none; }
.js .site-nav.open { display: block; }

.hero { position: relative; overflow: hidden; display: flex; align-items: center; min-height: calc(100svh - var(--header)); padding-block: 3rem 4rem; }
#network { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; pointer-events: none; }
.hero-grid { position: relative; display: grid; gap: 3rem; align-items: center; }
.label { display: inline-flex; align-items: center; gap: .6rem; font: 500 .85rem var(--head-font); color: var(--accent-text); border: 1px solid var(--border); background: var(--card); border-radius: 99px; padding: .35rem .9rem; }
.label::before { content: ''; width: .5rem; height: .5rem; border-radius: 50%; background: var(--highlight); }
h1 { font-size: clamp(1.9rem, 6.2vw, 3.25rem); line-height: 1.2; letter-spacing: -.03em; margin-block: 1.25rem; text-wrap: balance; }
.lead { color: var(--muted); font-size: clamp(1.05rem, 2.2vw, 1.2rem); max-width: 36rem; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.profile { justify-self: center; text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; width: min(100%, 20rem); }
.profile img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: calc(var(--radius) - 4px); }
figcaption { font-weight: 500; margin-block: 1rem .75rem; }
.socials { display: flex; justify-content: center; gap: .6rem; }
.socials a { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--border); border-radius: 10px; color: var(--text); transition: transform .2s, border-color .2s, box-shadow .2s; }
.socials a:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 0 18px rgb(34 197 94 / .3); }

.rise { animation: rise .7s ease-out both; }
.hero-text > :nth-child(2) { animation-delay: .08s; }
.hero-text > :nth-child(3) { animation-delay: .16s; }
.hero-text > :nth-child(4) { animation-delay: .24s; }
.profile { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

@media (min-width: 64rem) {
  .header-row { flex-wrap: nowrap; }
  .site-nav, .js .site-nav { display: block; order: 0; width: auto; padding: 0; }
  .site-nav ul { display: flex; gap: 1.5rem; }
  .menu-btn, .js .menu-btn { display: none; }
  .hero-grid { grid-template-columns: 1.6fr 1fr; gap: 4rem; }
  .profile { justify-self: end; }
}
@media (max-width: 22.4375rem) {
  :root { --space: 1rem; }
  .logo { font-size: .85rem; }
  .header-row, .header-actions { gap: .35rem; }
  .icon-btn { width: 2.25rem; height: 2.25rem; }
  .btn-small { padding: 0 .65rem; font-size: .8rem; }
}

/* Sections */
h2, h3, h4, .footer-name { font-family: var(--head-font); line-height: 1.35; }
h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); letter-spacing: -.02em; }
h3 { font-size: 1.1rem; }
h4 { font-size: .98rem; }
.section { padding-block: clamp(3.5rem, 9vw, 6.5rem); border-top: 1px solid var(--border); }
.section-head { margin-bottom: 2.5rem; }
.section-head h2::after { content: ''; display: block; width: 3rem; height: 3px; margin-top: .75rem; background: var(--accent); border-radius: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }

.card { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; color: var(--text); transition: translate .25s, border-color .25s, box-shadow .25s; }
.card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(16rem circle at var(--mx, 50%) var(--my, 50%), rgb(34 197 94 / .1), transparent 70%); }
.card h3, .card h4 { margin-bottom: .5rem; }
.card p { color: var(--muted); }
.card > svg { width: 2rem; height: 2rem; color: var(--accent-text); margin-bottom: 1rem; }
@media (hover: hover) {
  .card:not(.form):hover { translate: 0 -4px; border-color: var(--accent); box-shadow: 0 10px 30px rgb(34 197 94 / .15); }
  .card:not(.form):hover::after { opacity: 1; }
}
.card-link { display: inline-block; position: relative; z-index: 1; font-weight: 600; padding-block: .35rem; }
.card-link:hover { text-decoration: underline; }
.service { display: flex; flex-direction: column; align-items: flex-start; }
.card .examples-label { font: 500 .75rem var(--head-font); text-transform: uppercase; letter-spacing: .08em; margin-top: 1.25rem; }
.examples, .bullets { list-style: disc; padding-left: 1.1rem; color: var(--muted); font-size: .95rem; }
.examples { margin-block: .4rem 1.25rem; }
.service .card-link { margin-top: auto; }
.date { font: 500 .8rem var(--head-font); margin-bottom: .5rem; }
.card .date { color: var(--accent-text); }
.card .org { margin-bottom: .6rem; }
.card .note { margin-top: .75rem; font-size: .9rem; }
.compact { padding: 1.25rem; font-size: .92rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { border: 1px solid var(--border); border-radius: 8px; padding: .2rem .65rem; font-size: .85rem; }

/* Timelines */
.timeline { position: relative; display: grid; gap: 1.25rem; max-width: 48rem; list-style: none; }
.timeline::before, .timeline::after { content: ''; position: absolute; left: 1.05rem; top: 0; width: 2px; height: 100%; background: var(--border); }
.timeline::after { background: var(--accent); transform-origin: top; transform: scaleY(var(--fill, 1)); }
.step { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.dot { position: relative; z-index: 1; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; margin-top: .9rem; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); color: var(--accent-text); font: 700 .85rem var(--head-font); }
#process .card h3 { margin: 0 0 .35rem; font-size: 1rem; }
#process .card { padding-block: 1.15rem; }

/* Portfolio and blog */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.filters:empty { display: none; }
.filters button { font: 500 .9rem var(--body-font); color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: 99px; padding: .5rem 1rem; cursor: pointer; }
.filters button[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.project { display: flex; flex-direction: column; gap: .6rem; overflow-wrap: anywhere; }
.project img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.project h3 { margin: 0; }
.project h3 a { color: var(--text); }
.project .links { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: auto; }

/* About and contact */
.about-text { font-size: 1.125rem; color: var(--muted); max-width: 40rem; }
.buttons { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.facts { display: grid; gap: 1rem; align-content: start; }
.facts dt { font: 500 .75rem var(--head-font); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.facts dd { font-weight: 600; }
.contact-grid, .about-grid { align-items: start; }
.contact-info { display: grid; gap: 1.25rem; }
.info { display: flex; align-items: center; gap: 1rem; overflow-wrap: anywhere; }
.info > svg { flex: none; margin: 0; }
.info strong { display: block; }
.form { display: grid; gap: 1.1rem; }
.form label { display: grid; gap: .35rem; font-weight: 500; font-size: .95rem; }
.form input, .form select, .form textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--field); border-radius: 10px; padding: .75rem .9rem; }
.form textarea { resize: vertical; }
.form .btn { cursor: pointer; font: 600 1rem var(--body-font); }
.form .btn:disabled { opacity: .6; cursor: wait; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding-block: 3rem 2rem; color: var(--muted); }
.footer-grid { display: grid; gap: 1.75rem; }
.footer-name { color: var(--text); font-weight: 700; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.site-footer .socials { justify-content: flex-start; }
.copyright { margin-top: 2rem; font-size: .85rem; }

/* Project and blog pages */
.reading { max-width: 48rem; padding-block: 2.5rem 5rem; min-height: 70vh; }
.detail-content { overflow-wrap: anywhere; }
.detail-content h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); }
.detail-content h2, .detail-content h3 { margin-block: 2rem .75rem; }
.detail-content p, .detail-content ul, .detail-content ol, .detail-content pre, .detail-content table, .detail-content blockquote { margin-bottom: 1rem; }
.detail-content ul { list-style: disc; }
.detail-content ul, .detail-content ol { padding-left: 1.25rem; }
.detail-content img { height: auto; border-radius: var(--radius); margin-block: 1.5rem; }
.detail-content pre { overflow-x: auto; background: #0d1117; color: #e6edf3; border-radius: 10px; padding: 1rem; font-size: .9rem; }
.detail-content table { display: block; overflow-x: auto; border-collapse: collapse; }
.detail-content th, .detail-content td { border: 1px solid var(--border); padding: .5rem .75rem; }
.detail-content blockquote { border-left: 3px solid var(--accent); padding-left: 1rem; color: var(--muted); }
.detail-meta-line { color: var(--muted); font-size: .95rem; }
.detail-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-block: 1rem; }

.site-nav a[aria-current] { color: var(--accent-text); }
.hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(22rem circle at var(--mx, 50%) var(--my, 50%), rgb(34 197 94 / .09), transparent 70%); }
.hero.pointing::after { opacity: 1; }

.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease, translate .25s, border-color .25s, box-shadow .25s; }

@media (min-width: 40rem) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: 1.7fr 1fr; gap: 3rem; }
  .contact-grid { grid-template-columns: 1fr 1.5fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1.2fr 1.6fr auto; align-items: start; }
}

/* Logo */
.logo { display: flex; align-items: center; white-space: nowrap; font-size: 1.4rem; letter-spacing: -.03em; }
.logo img { margin-right: .65rem; width: 2.5rem; height: 2.5rem; border: 1px solid var(--border); border-radius: 10px; transition: rotate .3s; }
.logo:hover img { rotate: -8deg; }
:root { --header: 5rem; }
.wrap { width: min(76rem, 100% - 2 * var(--space)); }

/* Hero */
h1 { font-size: clamp(2.25rem, 7.4vw, 4.25rem); line-height: 1.14; letter-spacing: -.05em; margin-block: 1.5rem; }
.word { display: inline-block; animation: word .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 70ms + .1s); }
.word.grad { background: linear-gradient(100deg, var(--grad-1), var(--grad-2), var(--grad-1)) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: word .7s cubic-bezier(.2, .8, .2, 1) both, shine 6s linear infinite; animation-delay: calc(var(--i) * 70ms + .1s), 0s; padding-bottom: .05em; }
@keyframes word { from { opacity: 0; translate: 0 .6em; filter: blur(6px); } }
@keyframes shine { to { background-position: -200% 0; } }
.lead { font-size: clamp(1.1rem, 2.4vw, 1.35rem); }
.hero-text > .lead { animation-delay: .6s; }
.hero-text > .hero-buttons { animation-delay: .75s; }
.btn-large { min-height: 3.5rem; padding-inline: 1.9rem; font-size: 1.05rem; gap: .6rem; }
.arrow { transition: translate .2s; }
.btn:hover .arrow { translate: 5px 0; }
#network { opacity: .85; }
.aurora { position: absolute; inset: 0; pointer-events: none; }
.aurora i { position: absolute; width: 38rem; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgb(34 197 94 / .22), transparent 65%); top: -12rem; right: -8rem; animation: drift 12s ease-in-out infinite alternate; }
.aurora i + i { background: radial-gradient(circle, rgb(239 68 68 / .1), transparent 65%); top: auto; right: auto; bottom: -18rem; left: -12rem; animation-delay: -6s; }
@keyframes drift { to { translate: -5rem 4rem; scale: 1.15; } }

.profile { background: none; border: 0; padding: 0; width: min(100%, 23rem); }
.portrait { position: relative; padding: 5px; border-radius: 2rem; animation: float 6s ease-in-out infinite; }
.portrait::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: conic-gradient(from var(--angle), #22c55e, transparent 30%, transparent 55%, #ef4444 65%, transparent 75%, #22c55e); animation: spin 7s linear infinite; }
.portrait::after { content: ''; position: absolute; inset: 10%; z-index: -1; background: #22c55e; filter: blur(70px); opacity: .3; }
.profile .portrait img { position: relative; border-radius: calc(2rem - 5px); background: var(--card); }
@property --angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --angle: 360deg; } }
@keyframes float { 50% { translate: 0 -10px; } }
.chip { position: absolute; z-index: 1; font: 500 .8rem var(--head-font); color: var(--text); background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--accent); border-radius: 99px; padding: .45rem .85rem; box-shadow: 0 8px 24px rgb(0 0 0 / .25); animation: float 5s ease-in-out infinite; }
.chip-1 { top: 8%; left: -.75rem; }
.chip-2 { top: 42%; right: -.75rem; animation-delay: -1.7s; }
.chip-3 { bottom: 7%; left: -.75rem; animation-delay: -3.4s; }
figcaption { font-size: 1.15rem; margin-top: 1.5rem; }

/* Technology strip */
.marquee { overflow: hidden; border-top: 1px solid var(--border); padding-block: 1.25rem; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee ul { display: flex; }
.marquee li { display: flex; align-items: center; gap: 2.5rem; padding-right: 2.5rem; font: 500 1rem var(--head-font); color: var(--muted); white-space: nowrap; }
.marquee li::after { content: '◆'; color: var(--accent-text); font-size: .6rem; }
@keyframes marquee { to { translate: -50% 0; } }

/* Livelier sections */
.eyebrow { font: 500 .85rem var(--head-font); color: var(--accent-text); margin-bottom: .4rem; }
.eyebrow::before { content: '// '; opacity: .7; }
h2 { font-size: clamp(1.9rem, 5vw, 2.75rem); }
.section:nth-of-type(even) { background: radial-gradient(50rem 24rem at 90% 0, rgb(34 197 94 / .07), transparent 70%); }
.card { background: linear-gradient(160deg, color-mix(in srgb, var(--card) 94%, var(--accent)), var(--card) 45%); }
.service > svg { width: 3.5rem; height: 3.5rem; padding: .85rem; border-radius: 14px; background: rgb(34 197 94 / .12); border: 1px solid rgb(34 197 94 / .3); transition: rotate .3s, scale .3s; }
.service:hover > svg { rotate: -8deg; scale: 1.08; }
.tags li { transition: border-color .2s, translate .2s; }
.tags li:hover { border-color: var(--accent); translate: 0 -2px; }

/* "Let's talk" button */
.talk { position: fixed; z-index: 15; right: 1rem; bottom: 1rem; display: flex; align-items: center; gap: .75rem; padding: .4rem; border-radius: 99px; background: var(--card); border: 1px solid var(--accent); color: var(--text); box-shadow: 0 10px 30px rgb(0 0 0 / .35); transition: translate .3s, opacity .3s, visibility .3s; }
.talk:hover { translate: 0 -4px; }
.talk.away { opacity: 0; visibility: hidden; translate: 0 1rem; }
.talk-icon { position: relative; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.talk-icon::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); animation: pulse 2s ease-out infinite; }
@keyframes pulse { to { scale: 1.6; opacity: 0; } }
.talk-text { display: none; font-weight: 600; line-height: 1.3; padding-right: 1rem; }
.talk-text small { display: block; font-weight: 400; color: var(--muted); }
.site-footer { padding-bottom: 6rem; }
@media (min-width: 40rem) { .talk-text { display: block; } .talk { right: 1.5rem; bottom: 1.5rem; } }

/* Custom cursor: dot and ring, created by site.js */
.cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; z-index: 100; border-radius: 50%; pointer-events: none; opacity: 0; }
.cursor-dot { width: 8px; height: 8px; margin: -4px; background: var(--accent); box-shadow: 0 0 0 2px var(--bg), 0 0 10px 2px var(--accent); }
.cursor-ring { width: 38px; height: 38px; margin: -19px; border: 1.5px solid var(--accent-text); transition: width .25s, height .25s, margin .25s, background-color .25s, opacity .2s; }
.custom-cursor .cursor-dot, .custom-cursor .cursor-ring { opacity: 1; }
.custom-cursor.cursor-active .cursor-ring { border-color: var(--text); box-shadow: 0 0 0 1px var(--bg); width: 58px; height: 58px; margin: -29px; background: rgb(34 197 94 / .14); }
.custom-cursor.cursor-down .cursor-ring { width: 28px; height: 28px; margin: -14px; }
html.custom-cursor, html.custom-cursor * { cursor: none !important; }

@media (min-width: 64rem) {
  .hero-grid { grid-template-columns: 1.75fr 1fr; }
}
@media (min-width: 64rem) and (max-width: 76rem) {
  h1 { font-size: 3.35rem; }
  .site-nav ul { gap: .85rem; }
  .site-nav a { font-size: .85rem; }
  .logo { font-size: 1.1rem; }
  .header-row { gap: .6rem; }
}
@media (max-width: 30rem) {
  .logo { font-size: 1.05rem; }
  .logo img { display: none; }
  .btn-large { min-height: 3.1rem; padding-inline: 1.3rem; font-size: .95rem; }
}
@media (max-width: 22.4375rem) { .logo { font-size: .85rem; } }

/* Round portrait */
.profile .portrait { border-radius: 50%; }
.profile .portrait img { border-radius: 50%; }

/* Short screens, such as phones held sideways: the open menu scrolls. */
@media (max-width: 63.9375rem) {
  .js .site-nav.open { max-height: calc(100vh - var(--header)); max-height: calc(100dvh - var(--header)); overflow-y: auto; overscroll-behavior: contain; }
}

/* Very narrow phones: keep the header on one row. */
@media (max-width: 19rem) {
  :root { --space: .7rem; }
  .header-row { flex-wrap: nowrap; }
  .site-nav, .js .site-nav { position: absolute; left: 0; right: 0; top: 100%; padding-inline: var(--space); background: var(--bg); border-bottom: 1px solid var(--border); }
  .logo { font-size: .75rem; }
  .btn-small { padding: 0 .5rem; font-size: .75rem; }
  h1 { font-size: 1.9rem; }
}
/* Phones held sideways */
@media (max-height: 30rem) and (orientation: landscape) {
  :root { --header: 4rem; }
  .logo img { width: 2rem; height: 2rem; }
  .hero { padding-block: 2rem; }
  h1 { font-size: clamp(1.7rem, 4.6vw, 2.4rem); margin-block: .9rem; }
  .lead { font-size: 1rem; }
  .hero-buttons { margin-top: 1.25rem; }
  .talk-text { display: none; }
}
/* Very large monitors */
@media (min-width: 120rem) and (min-height: 60rem) { html { font-size: 118%; } }
@media (min-width: 150rem) and (min-height: 75rem) { html { font-size: 135%; } }

.nowrap { white-space: nowrap; }
@media (max-width: 30rem) { h1 { font-size: clamp(1.5rem, 9vw, 2.25rem); } }

/* How I work and Experience: alternating sides of the filling line on desktop */
@media (min-width: 64rem) {
  .timeline.zigzag { max-width: none; gap: 0; }
  .timeline.zigzag::before, .timeline.zigzag::after { left: calc(50% - 1px); }
  .zigzag .step { grid-template-columns: minmax(0, 1fr) 2.25rem minmax(0, 1fr); column-gap: 1.75rem; }
  .zigzag .step + .step { margin-top: -1.5rem; }
  .zigzag .dot { grid-area: 1 / 2; margin-top: 1.5rem; }
  .zigzag .step .card { grid-area: 1 / 1; }
  .zigzag .step:nth-child(even) .card { grid-area: 1 / 3; }
}

/* The open mobile menu sits below the header, so the header keeps its spacing */
@media (max-width: 63.9375rem) {
  .js .site-nav { position: absolute; left: 0; right: 0; top: 100%; width: auto; padding: .25rem var(--space) .75rem; background: var(--bg); border-bottom: 1px solid var(--border); }
}

/* Contact form pop-up */
.toasts { position: fixed; z-index: 50; top: calc(var(--header) + .75rem); right: 1rem; width: min(24rem, 100% - 2rem); }
.toast { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; gap: .85rem; align-items: start; padding: 1rem 1rem 1.15rem; background: var(--card); border: 1px solid var(--accent); border-radius: var(--radius); box-shadow: 0 14px 40px rgb(0 0 0 / .35); animation: toast-in .4s cubic-bezier(.2, .8, .2, 1); }
.toast.error { border-color: var(--highlight); }
.toast-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.toast.error .toast-icon { background: var(--highlight); color: var(--bg); }
.toast strong { display: block; font-family: var(--head-font); }
.toast p { color: var(--muted); font-size: .95rem; overflow-wrap: anywhere; }
.toast button { width: 1.75rem; height: 1.75rem; font-size: 1.35rem; line-height: 1; color: var(--muted); background: none; border: 0; cursor: pointer; }
.toast button:hover { color: var(--text); }
.toast i { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--accent); transform-origin: left; animation: toast-time 7s linear forwards; }
.toast:hover i, .toast:focus-within i { animation-play-state: paused; }
@keyframes toast-in { from { opacity: 0; translate: 2rem 0; } }
@keyframes toast-time { to { transform: scaleX(0); } }

/* What clients say. By default the cards form a still grid. */
.review-window { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); width: min(76rem, 100% - 2 * var(--space)); margin-inline: auto; padding-block: .5rem; }
.review-track, .review-track ul { display: contents; }
.review-window .clone { display: none; }
.review { display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; overflow-wrap: anywhere; }
.review blockquote::before { content: '“'; display: block; font: 700 3rem/.8 var(--head-font); color: var(--accent-text); margin-bottom: .5rem; }
.card.review blockquote p { color: var(--text); white-space: pre-line; }
.client { display: flex; align-items: center; gap: .85rem; }
.client img, .initials { flex: none; width: 3.25rem; height: 3.25rem; border-radius: 50%; object-fit: cover; }
.initials { display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font: 700 1rem var(--head-font); }
.client p { font-size: .9rem; }
.client strong { display: block; color: var(--text); font-size: 1rem; }
/* Phones: one card at a time, swiped sideways. */
@media (max-width: 47.9375rem) {
  .review-window { display: flex; gap: 1rem; width: auto; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding-inline: var(--space); scroll-padding-inline: var(--space); }
  .review-window .review { flex: 0 0 calc(100% - 1.5rem); scroll-snap-align: start; }
  .review-window .review:only-child { flex-basis: 100%; }
}
/* Wider screens with four or five reviews: one slowly moving row that can be dragged. */
@media (min-width: 48rem) and (prefers-reduced-motion: no-preference) {
  .review-window.moving { display: block; overflow: hidden; cursor: grab; user-select: none; touch-action: pan-y; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
  .moving .review-track { display: flex; width: max-content; animation: marquee calc(var(--cards) * 10s) linear infinite; }
  .moving .review-track ul { display: flex; gap: 1.25rem; padding-right: 1.25rem; }
  .moving .review { width: min(24rem, 44vw); }
  .review-window.moving .clone { display: flex; }
  .review-window.moving:focus-visible { mask-image: none; }
  .review-window.moving.dragging { cursor: grabbing; }
  .moving img { -webkit-user-drag: none; }
  .moving:focus-visible .review-track, .moving.held .review-track, .moving.dragging .review-track { animation-play-state: paused; }
}
@media (min-width: 48rem) and (hover: hover) {
  .moving:hover .review-track { animation-play-state: paused; }
}

/* Blog: a wide page; the article is centred and its text keeps a comfortable line length. */
.reading.blog { max-width: none; }
.blog-head { margin-bottom: 2rem; }
.blog-head h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
.blog-list { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); }
.blog-card { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.blog-card > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--border); }
.blog-card-body { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem 1.5rem 1.5rem; flex: 1; }
.blog-card h2 { font-size: 1.25rem; line-height: 1.3; margin: 0; }
.blog-card h2 a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.blog-card h2 a:hover { color: var(--accent-text); }
.blog-card:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.blog-card .read-more { margin-top: auto; padding-top: .5rem; color: var(--accent-text); font-weight: 600; }
.post { max-width: 60rem; margin-inline: auto; }
.post-head { margin-block: 1rem 1.5rem; }
.post-head h1 { font-size: clamp(1.9rem, 5.5vw, 3rem); line-height: 1.15; margin-block: .5rem .75rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; }
.detail-content .chips { padding-left: 0; list-style: none; margin-bottom: 0; }
.chips li { font: 500 .78rem var(--head-font); color: var(--accent-text); border: 1px solid var(--border); border-radius: 999px; padding: .2rem .7rem; }
.post .detail-summary { font-size: 1.15rem; color: var(--text); margin-top: 1rem; }
.post .cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-block: 0 2rem; }
.post .detail-markdown { font-size: 1.05rem; line-height: 1.8; }
.post .detail-markdown > :is(p, ul, ol, blockquote, h2, h3, h4) { max-width: 50rem; }
.post .detail-markdown h2 { font-size: clamp(1.4rem, 3.5vw, 1.8rem); margin-top: 2.5rem; }
.post .detail-markdown img { max-width: 100%; }
.post .detail-markdown hr { border: 0; border-top: 1px solid var(--border); margin-block: 2rem; }
.post .detail-markdown code:not(pre code) { background: color-mix(in srgb, var(--accent) 12%, var(--card)); border-radius: 6px; padding: .12em .4em; font-size: .9em; }
.post .detail-markdown pre { padding: 1.1rem 1.25rem; line-height: 1.6; }
.post .detail-markdown th { background: var(--card); text-align: left; }
.post .detail-markdown th, .post .detail-markdown td { overflow-wrap: normal; min-width: 6rem; }
.post .detail-markdown .mermaid { overflow-x: auto; text-align: center; margin-block: 1.5rem; }
.post .detail-markdown .mermaid svg { width: 100%; max-width: 100%; height: auto; fill: initial; stroke: initial; stroke-width: initial; stroke-linecap: initial; stroke-linejoin: initial; }
.post .detail-markdown li > ul, .post .detail-markdown li > ol { margin-block: .4rem 0; }
.post .detail-markdown input[type=checkbox] { margin-right: .5rem; accent-color: var(--accent); }
.share { margin-top: 3rem; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(160deg, color-mix(in srgb, var(--card) 94%, var(--accent)), var(--card) 60%); display: grid; gap: 1rem; }
.detail-content .share h2 { margin: 0 0 .25rem; font-size: 1.25rem; }
.share p { margin: 0; color: var(--muted); }
.share-buttons { display: flex; flex-wrap: wrap; gap: .75rem; }
.share-btn { display: inline-flex; align-items: center; gap: .55rem; min-height: 2.75rem; padding: .5rem 1.05rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: 600 .92rem var(--body-font); white-space: nowrap; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s, translate .2s; }
.share-btn svg { width: 1.2rem; height: 1.2rem; fill: currentColor; flex: none; }
.share-btn svg.stroke { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.share-btn:hover, .share-btn:focus-visible { color: #fff; translate: 0 -2px; }
.share-btn.linkedin:hover, .share-btn.linkedin:focus-visible { background: #0a66c2; border-color: #0a66c2; }
.share-btn.facebook:hover, .share-btn.facebook:focus-visible { background: #1877f2; border-color: #1877f2; }
.share-btn.whatsapp:hover, .share-btn.whatsapp:focus-visible { background: #1faa55; border-color: #1faa55; }
.share-btn.x:hover, .share-btn.x:focus-visible { background: #000; border-color: #444; }
.share-btn.copy:hover, .share-btn.copy:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.code-block { position: relative; margin-bottom: 1rem; }
.code-block pre { margin-bottom: 0; padding-top: 2.6rem; }
.code-copy { position: absolute; top: .55rem; right: .6rem; display: inline-flex; align-items: center; gap: .4rem; min-height: 2rem; padding: .25rem .7rem; border: 1px solid rgb(255 255 255 / .18); border-radius: 8px; background: rgb(255 255 255 / .06); color: #c9d1d9; font: 500 .8rem var(--body-font); cursor: pointer; transition: background-color .2s, border-color .2s, color .2s; }
.code-copy svg { width: 1rem; height: 1rem; }
.code-copy:hover, .code-copy:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (max-width: 30rem) { .share-btn { flex: 1 1 auto; justify-content: center; padding-inline: .8rem; } }

/* 404 page */
.notfound { min-height: calc(100vh - var(--header) - 12rem); min-height: calc(100svh - var(--header) - 12rem); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-block: 3rem 4rem; position: relative; }
.notfound::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse closest-side at 50% 32%, rgb(34 197 94 / .13), transparent); }
.notfound-art { display: flex; align-items: center; justify-content: center; gap: clamp(.25rem, 2vw, 1rem); font: 700 clamp(5.5rem, 24vw, 11rem)/1 var(--head-font); margin-bottom: 1rem; }
.notfound-art .four { background: linear-gradient(160deg, var(--grad-1), var(--grad-2)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: nf-float 5s ease-in-out infinite; }
.notfound-art .four:last-child { animation-delay: -2.5s; }
.notfound-art .zero { display: grid; place-items: center; width: .82em; }
.notfound-art .zero svg { width: 100%; height: auto; overflow: visible; fill: none; stroke: var(--accent); stroke-width: 10; }
.notfound-art .orbit { fill: var(--highlight); stroke: none; transform-origin: 60px 60px; animation: nf-spin 6s linear infinite; }
.notfound h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); margin-block: .25rem .75rem; }
.notfound-text { max-width: 32rem; color: var(--muted); font-size: 1.05rem; }
.notfound-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .85rem; margin-top: 1.75rem; }
.notfound-links { margin-top: 2.25rem; color: var(--muted); }
.notfound-links ul { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: .6rem; }
.notfound-links a { display: inline-block; padding: .4rem .95rem; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text); font-weight: 500; font-size: .92rem; transition: border-color .2s, color .2s, translate .2s; }
.notfound-links a:hover { border-color: var(--accent); color: var(--accent-text); translate: 0 -2px; }
@keyframes nf-float { 50% { translate: 0 -.6rem; } }
@keyframes nf-spin { to { rotate: 360deg; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
