:root {
  --bg: #f7f8fb; --surface: #ffffff; --surface-2: #eef1f7; --text: #121a2e; --muted: #55607a;
  --line: #dfe4ee; --accent: #3b5bfd; --accent-ink: #ffffff; --accent-soft: #e6ebff; --glow: rgba(59, 91, 253, .18);
  --radius: 16px; --shadow: 0 1px 2px rgba(18, 26, 46, .06), 0 8px 28px rgba(18, 26, 46, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020; --surface: #121933; --surface-2: #19224a; --text: #e8ecf8; --muted: #9aa6c6;
    --line: #243061; --accent: #7a93ff; --accent-ink: #0b1020; --accent-soft: #1d2858; --glow: rgba(122, 147, 255, .22);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .28);
  }
}
:root[data-theme="dark"] {
  --bg: #0b1020; --surface: #121933; --surface-2: #19224a; --text: #e8ecf8; --muted: #9aa6c6;
  --line: #243061; --accent: #7a93ff; --accent-ink: #0b1020; --accent-soft: #1d2858; --glow: rgba(122, 147, 255, .22);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav__in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 14px; letter-spacing: 0; }
.nav__menu { display: flex; align-items: center; gap: 22px; }
.nav__menu a:not(.btn) { color: var(--muted); font-weight: 500; font-size: 15px; }
.nav__menu a:not(.btn):hover { color: var(--text); text-decoration: none; }
.theme { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.nav__toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; cursor: pointer; padding: 0; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.nav__toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 600; border: 1px solid var(--accent); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 24px var(--glow); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); box-shadow: none; }
.btn--sm { padding: 8px 16px; font-size: 14px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* hero */
.hero { padding: 88px 0 56px; position: relative; }
.hero::before { content: ""; position: absolute; inset: -20% 0 auto auto; width: min(520px, 100%); aspect-ratio: 1; background: radial-gradient(closest-side, var(--glow), transparent); z-index: -1; pointer-events: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); }
.hero h1 { font-size: clamp(2.1rem, 5.5vw, 3.9rem); margin: 22px 0; max-width: 20ch; text-wrap: balance; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 64ch; margin-bottom: 28px; }
.lead strong { color: var(--text); }
.stats { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stats li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stats b { display: block; font-size: 2rem; letter-spacing: -.03em; color: var(--accent); }
.stats span { color: var(--muted); font-size: 14px; }

/* hero stage: portrait photo behind the intro copy */
.hero__stage {
  --text: #e8ecf8; --muted: #c3cce6; --surface: rgba(11, 16, 32, .62); --line: rgba(255, 255, 255, .22);
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center;
  min-height: clamp(440px, 46vw, 580px); margin-bottom: 28px; border-radius: 24px; color: var(--text);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  /* 32px blurred preview paints instantly while the real photo streams in */
  background: #0b1020 url("data:image/webp;base64,UklGRiYBAABXRUJQVlA4IBoBAACwBgCdASogABUAPu1gqE2ppaOiMAgBMB2JbACdMoMlyZW7qs+BYPe9I21m4+OkhNj28ZuQxnOi0dCUD65pAAD+nuVIAZpeJeW8tl1rznbGlrBd7gKYaHaFIQIhBLhS9zlWbq2snuVrCQ7jH+n/1zpnZVLR7N1vGBS6AX67Ry5/s2/EBrR+3v7E9Xuah0mMElXxGWh34b9JuO/xNU3Af3auXJjZ/WSGCh3ZgUaixACUTi7eDBl9rv8SYGDrVO4dwx1Yas11v/7nZGAk4tpjrNhv/l4E77uVcj4VYgX1itMn8LcK3qGTMdQXyfwa2hJSDAz/yepsF2QU83yT5QIHNwN3g4qzFgrDnqz8ICit12KBybYCosWmmy+AAAA=") center / cover;
}
.hero__media, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__media img { object-fit: cover; object-position: 74% 30%; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; pointer-events: none; }
/* Transparent layer above the photo: darkens it for legible text and takes every pointer event instead of the <img>. */
.hero__shield { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 12, 26, .94) 0%, rgba(8, 12, 26, .82) 36%, rgba(8, 12, 26, .26) 66%, rgba(8, 12, 26, 0) 100%); }
.hero__copy { position: relative; max-width: min(700px, 100%); padding: clamp(28px, 5vw, 64px); }
.hero__copy .eyebrow { backdrop-filter: blur(6px); }
.hero__copy h1 { margin: 22px 0; }
.hero__copy .lead { margin-bottom: 0; }
.hero__mark { position: absolute; right: 16px; bottom: 12px; font: 500 11px var(--mono); letter-spacing: .04em; color: rgba(255, 255, 255, .6); text-shadow: 0 1px 3px rgba(0, 0, 0, .7); pointer-events: none; user-select: none; }
@media (max-width: 1024px) {
  /* Tablet and phone: the photo is its own block on top and the copy sits below it,
     so however long the text is, it can never cover the face. */
  .hero__stage { display: block; min-height: 0; background-image: none; --photo-h: clamp(260px, 52vw, 420px); }
  .hero__media { position: relative; display: block; height: var(--photo-h); }
  .hero__media img { object-position: 72% 22%; }
  .hero__shield { bottom: auto; height: var(--photo-h); background: linear-gradient(180deg, rgba(8, 12, 26, 0) 40%, rgba(8, 12, 26, .96) 100%); }
  .hero__copy { max-width: 100%; margin-top: -56px; padding: 0 clamp(20px, 5vw, 44px) 40px; }
  .hero__copy h1 { margin: 16px 0; }
}
@media (max-width: 480px) { .hero__stage { border-radius: 18px; } .hero__mark { display: none; } }
@media print { .hero__media, .hero__shield, .hero__mark { display: none; } .hero__stage { background: none; color: #000; } }

/* sections */
.section { padding: 72px 0 8px; }
.section__title { display: flex; align-items: center; gap: 16px; font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 28px; }
/* Number badge: a circle sized to the heading's cap height, centred on the text line */
.section__title span { --s: clamp(42px, 4vw, 54px); flex: none; display: grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%; border: 2.5px solid var(--accent); background: var(--accent-soft); color: var(--accent); font: 700 calc(var(--s) * .42) / 1 var(--mono); letter-spacing: 0; padding-top: max(0px, calc(var(--dy, 0px) * 2)); padding-bottom: max(0px, calc(var(--dy, 0px) * -2)); }
/* the digits' box is trimmed to cap height, so it is centred on the glyphs themselves, not on the font's line box */
.section__title span b { display: block; font: inherit; line-height: 1; text-box: trim-both cap alphabetic; }
.section__intro { color: var(--muted); max-width: 70ch; margin: -12px 0 24px; }
.grid { display: grid; gap: 16px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { font-size: 1rem; margin-bottom: 14px; }

.about { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: start; }
.about p { color: var(--muted); }
.about p strong { color: var(--text); }
.facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--text); font-size: 13.5px; font-weight: 500; }
.chips--sm li { font-size: 12.5px; padding: 3px 10px; }

/* projects */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.pill { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.pill.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.project { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); transition: transform .2s, border-color .2s; }
.project:hover { transform: translateY(-3px); border-color: var(--accent); }
.project[hidden] { display: none; }
.project--feature { grid-column: 1 / -1; background: linear-gradient(135deg, var(--surface), var(--surface-2)); }
.project--feature .bullets { columns: 2; column-gap: 32px; }
.project--feature .bullets li { break-inside: avoid; }
.project h3 { font-size: 1.3rem; margin: 8px 0 8px; }
.project h3 small { overflow-wrap: anywhere; display: block; font: 500 .8rem var(--mono); color: var(--muted); margin-top: 4px; letter-spacing: 0; }
.project header p { color: var(--muted); margin: 0; }
.tag { display: inline-block; font: 600 11.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.tag--alt { color: var(--muted); }
.tag b { color: var(--text); font-weight: 800; }
.bullets { margin: 0; padding-left: 18px; color: var(--muted); font-size: 15px; }
.bullets li { margin-bottom: 6px; }
.bullets b { color: var(--text); font-weight: 600; }
.project .chips { margin-top: auto; }
.links { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; font-size: 14px; }

/* project cards: a click zooms the card, a second click flips it */
.project { position: relative; cursor: pointer; }

/* copy-to-clipboard button with a tooltip: "Click to copy" on hover, "Copied" after the click */
.copy { position: relative; }
.copy__tip { position: absolute; left: 50%; bottom: calc(100% + 11px); z-index: 5; padding: 7px 12px; border-radius: 8px; background: #0b1020; border: 1px solid rgba(255, 255, 255, .22); color: #fff; font: 600 12px/1 var(--font); white-space: nowrap; box-shadow: 0 8px 22px rgba(0, 0, 0, .35); opacity: 0; transform: translate(-50%, 5px); transition: opacity .15s, transform .2s cubic-bezier(.2, .8, .2, 1), background .2s; pointer-events: none; }
.copy__tip::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top-color: #0b1020; transition: border-top-color .2s; }
.copy:hover .copy__tip, .copy:focus-visible .copy__tip, .copy.is-copied .copy__tip { opacity: 1; transform: translate(-50%, 0); }
.copy.is-copied .copy__tip { background: #16a34a; border-color: #16a34a; }
.copy.is-copied .copy__tip::after { border-top-color: #16a34a; }

/* Email button: Gmail logo in a white tile */
.btn__ico { display: grid; place-items: center; width: 26px; height: 26px; margin: -2px 10px -2px -10px; border-radius: 8px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.btn__ico img { display: block; width: 18px; height: 18px; pointer-events: none; }

/* skills: logo tile in front of the name */
.chips li.has-ico { display: inline-flex; align-items: center; gap: 5px; padding-left: 5px; }
.chip__ico { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 7px; background: #f3f5fb; box-shadow: 0 1px 2px rgba(0, 0, 0, .22); }
.chip__ico img { display: block; width: 15px; height: 15px; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.chips li.has-ico .chip__ico:last-of-type { margin-right: 3px; }

/* tech logos: every logo sits on a light tile so dark brand colours (Next.js, Express…) read in both themes */
.chips li.logo, .project--glass .chips li.logo { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: #f3f5fb; border: 1px solid rgba(255, 255, 255, .5); box-shadow: 0 1px 2px rgba(0, 0, 0, .18); transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s ease; }
.chips li.logo:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 6px 14px rgba(0, 0, 0, .25); }
/* hover: the technology's name slides out of the chip and takes its own room, pushing the other chips aside */
.chip__name { display: grid; grid-template-columns: 0fr; margin-left: -6px; opacity: 0; transition: grid-template-columns .5s cubic-bezier(.22, 1, .36, 1), margin-left .5s cubic-bezier(.22, 1, .36, 1), opacity .35s ease; }
.chip__name > span { min-width: 0; overflow: hidden; white-space: nowrap; color: #1b2440; font: 700 12px/1 var(--font); }
.chips li.logo:hover .chip__name, .chips li.logo:focus-within .chip__name { grid-template-columns: 1fr; margin-left: 0; opacity: 1; transition-delay: 0s, 0s, .05s; }
.chips li.logo img { display: block; width: 20px; height: 20px; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.chips li.logo sup { margin-left: -2px; color: #4b556e; font: 700 10.5px/1 var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* frosted-glass card: blurred site screenshot behind a glass layer; content sits above both */
.project--glass { --glass-a: 80%; --glass-b: 70%; --glass-dip: 6%; --glass-blur: 3px; --glass-blur-hover: 1.5px; --glass-bright: 1; --glass-tshadow: 0 1px 2px rgba(255, 255, 255, .9), 0 0 10px rgba(255, 255, 255, .85), 0 0 22px rgba(255, 255, 255, .6); isolation: isolate; overflow: hidden; border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); }
.project__bg { position: absolute; inset: -14px; z-index: -2; pointer-events: none; }
.project__bg img { display: block; width: 100%; height: 100%; object-fit: cover; filter: blur(var(--glass-blur)) saturate(1.3) brightness(var(--glass-bright)); transform: scale(1.05); transition: filter .7s, transform 1s cubic-bezier(.2, .7, .2, 1); user-select: none; -webkit-user-drag: none; }
.project__glass { position: absolute; inset: 0; z-index: -1; pointer-events: none; backdrop-filter: blur(8px) saturate(1.5); -webkit-backdrop-filter: blur(8px) saturate(1.5); background: linear-gradient(155deg, color-mix(in srgb, var(--surface) var(--glass-a), transparent), color-mix(in srgb, var(--surface) var(--glass-b), transparent)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 0 0 1px rgba(255, 255, 255, .06); transition: background .6s; }
/* hover: the site comes into focus, but the glass never gets thinner than 66% so text keeps its contrast */
.project--glass:hover .project__bg img { filter: blur(var(--glass-blur-hover)) saturate(1.35) brightness(var(--glass-bright)); transform: scale(1.1); }
.project--glass:hover .project__glass { background: linear-gradient(155deg, color-mix(in srgb, var(--surface) calc(var(--glass-a) - var(--glass-dip)), transparent), color-mix(in srgb, var(--surface) calc(var(--glass-b) - var(--glass-dip)), transparent)); }
.project--glass .tag { color: var(--accent); }
/* a soft halo in the glass tone around the lettering keeps it from melting into the photo */
.project--glass header, .project--glass .bullets { text-shadow: var(--glass-tshadow); }
.project--glass .chips li { text-shadow: none; }
.project--glass .bullets, .project--glass header p { color: var(--text); opacity: .86; }
.project--glass .chips li { background: color-mix(in srgb, var(--accent-soft) 86%, transparent); }
/* the photo is dark, so a dark glass can be thinner and show more of the site */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .project--glass { --glass-a: 72%; --glass-b: 60%; --glass-dip: 0%; --glass-blur: 3px; --glass-blur-hover: 2px; --glass-bright: .7; --glass-tshadow: 0 1px 2px rgba(0, 0, 0, .75), 0 0 10px rgba(0, 0, 0, .7), 0 0 22px rgba(0, 0, 0, .5); } }
:root[data-theme="dark"] .project--glass { --glass-a: 72%; --glass-b: 60%; --glass-dip: 0%; --glass-blur: 3px; --glass-blur-hover: 2px; --glass-bright: .7; --glass-tshadow: 0 1px 2px rgba(0, 0, 0, .75), 0 0 10px rgba(0, 0, 0, .7), 0 0 22px rgba(0, 0, 0, .5); }
/* a card whose photo is dark and calm can show more of it */
.project--glass.project--clear { --glass-a: 68%; --glass-b: 56%; --glass-dip: 0%; --glass-blur: 1.5px; --glass-blur-hover: 1px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .project--glass.project--clear { --glass-a: 56%; --glass-b: 44%; --glass-blur: 1.5px; --glass-blur-hover: 1px; --glass-bright: .8; } }
:root[data-theme="dark"] .project--glass.project--clear { --glass-a: 56%; --glass-b: 44%; --glass-blur: 1.5px; --glass-blur-hover: 1px; --glass-bright: .8; }
/* bright, busy screenshots: more blur and a thicker glass so they read as a soft wash of colour */
.project--glass.project--soft { --glass-a: 88%; --glass-b: 80%; --glass-blur: 7px; --glass-blur-hover: 5px; --glass-dip: 4%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .project--glass.project--soft { --glass-a: 82%; --glass-b: 72%; --glass-blur: 7px; --glass-blur-hover: 5px; --glass-bright: .62; } }
:root[data-theme="dark"] .project--glass.project--soft { --glass-a: 82%; --glass-b: 72%; --glass-blur: 7px; --glass-blur-hover: 5px; --glass-bright: .62; }
@media print { .project__bg, .project__glass { display: none; } }

/* corner icon on every card: "click to enlarge" */
.project__expand { position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 82%, transparent); color: var(--muted); backdrop-filter: blur(4px); transition: color .2s, border-color .2s, transform .25s cubic-bezier(.2, .8, .2, 1), background .2s; pointer-events: none; }
.project:hover .project__expand, .project:focus-visible .project__expand { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); transform: scale(1.15) rotate(8deg); }
.project header { padding-right: 36px; }
.mock header { padding-right: 0; }
.zoom__front header { padding-right: 40px; }

/* zoomed card with a flip to the website */
.zoom { position: fixed; inset: 0; z-index: 100; }
.zoom__backdrop { position: absolute; inset: 0; background: rgba(5, 8, 18, .66); backdrop-filter: blur(6px); opacity: 0; transition: opacity .4s; }
.zoom.is-open .zoom__backdrop { opacity: 1; }
.zoom__card { position: absolute; perspective: 2000px; transition: left .5s cubic-bezier(.2, .8, .2, 1), top .5s cubic-bezier(.2, .8, .2, 1), width .5s cubic-bezier(.2, .8, .2, 1), height .5s cubic-bezier(.2, .8, .2, 1); }
.zoom__flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .85s cubic-bezier(.4, .1, .2, 1); }
.zoom__card.is-flipped .zoom__flip { transform: rotateY(180deg); }
.zoom__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--accent); box-shadow: 0 30px 90px rgba(0, 0, 0, .55); }
.zoom__front { padding: 32px 32px 44px; overflow: auto; cursor: pointer; transform: none !important; }
.zoom__front header { padding: 0; }
.zoom__front h3 { font-size: 1.7rem; }
.zoom__front .bullets { font-size: 16px; }
.zoom__front .chips { margin-top: 4px; }
/* On hover the pointer becomes a "flip" symbol, so it is clear the card turns over when clicked. */
.zoom__front { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='18.5' fill='%233b5bfd' stroke='white' stroke-width='2'/%3E%3Cg fill='none' stroke='white' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M14 12 L7.5 26 H14 Z'/%3E%3Cpath d='M26 12 L32.5 26 H26 Z' fill='white' fill-opacity='.4'/%3E%3Cpath d='M20 9 V31' stroke-dasharray='2 3'/%3E%3C/g%3E%3C/svg%3E") 20 20, pointer; }
.zoom__front .zoom__x, .zoom__front a { cursor: pointer; }
.zoom__badge { position: absolute; right: 16px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 700 12.5px var(--mono); box-shadow: 0 6px 18px var(--glow); pointer-events: none; }
.zoom__badge i { font-style: normal; display: inline-block; transition: transform .6s cubic-bezier(.4, .1, .2, 1); }
.zoom__front:hover .zoom__badge i { transform: rotateY(180deg); }
@media (hover: none) { .zoom__front { cursor: pointer; } }
.zoom__x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer; }
.zoom__x:hover { border-color: var(--accent); color: var(--accent); }
.zoom__back { transform: rotateY(180deg); display: flex; flex-direction: column; }
.zoom__bar { cursor: default; }
.zoom__bar button.win__ext { border: 0; background: transparent; cursor: pointer; font-size: 16px; }
.zoom__card:not(.is-flipped) .zoom__back, .zoom__card.is-flipped .zoom__front { pointer-events: none; }

/* floating mini-browser windows */
.win-layer { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.win { position: absolute; display: flex; flex-direction: column; min-width: 300px; min-height: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 60px rgba(0, 0, 0, .35); overflow: hidden; pointer-events: auto; animation: win-in .16s ease-out; }
.win.is-active { border-color: var(--accent); box-shadow: 0 24px 80px rgba(0, 0, 0, .5), 0 0 0 1px var(--accent); }
.win.is-max { inset: 0 !important; width: auto !important; height: auto !important; border-radius: 0; }
@keyframes win-in { from { opacity: 0; transform: scale(.97) translateY(6px); } }
.win__bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface-2); border-bottom: 1px solid var(--line); cursor: grab; touch-action: none; user-select: none; }
.win__bar:active { cursor: grabbing; }
.win__lights { display: flex; gap: 7px; }
.win__light { width: 14px; height: 14px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; }
.win__light--close { background: #ff5f57; }
.win__light--max { background: #28c840; }
.win__light:hover { filter: brightness(1.15); }
.win__url { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font: 12.5px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win__ext { color: var(--muted); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; }
.win__ext:hover { color: var(--accent); background: var(--bg); text-decoration: none; }
.win__body { position: relative; flex: 1; min-height: 0; overflow: auto; background: var(--bg); }
.win__body iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.win:not(.is-active) .win__body::after, body.is-dragging .win__body::after { content: ""; position: absolute; inset: 0; }
.win__note { padding: 6px 12px; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-top: 1px solid var(--line); }
.win__grip { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none; background: linear-gradient(135deg, transparent 50%, var(--muted) 50%, var(--muted) 56%, transparent 56%, transparent 70%, var(--muted) 70%, var(--muted) 76%, transparent 76%); opacity: .6; }
.win.is-max .win__grip { display: none; }
body.is-dragging { user-select: none; }
.mock { padding: 28px clamp(16px, 4vw, 40px) 40px; max-width: 760px; }
.mock .tag { margin-bottom: 4px; }
.mock h3 { font-size: 1.6rem; margin: 6px 0 12px; }
.mock h3 small { display: block; font: 500 .8rem var(--mono); color: var(--muted); margin-top: 4px; }
.mock header { padding: 0; }
.mock header p { color: var(--muted); }
.mock .bullets { margin: 18px 0; }
.mock .chips { margin: 0 0 22px; }
.mock .btn { margin-right: 8px; }
.mock__why { margin: 0 0 18px; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--surface); color: var(--muted); font-size: 14px; border-radius: 0 8px 8px 0; }
.totop { position: fixed; right: 20px; bottom: 20px; z-index: 96; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px var(--glow), var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s, transform .2s, visibility .2s; }
.totop.show { opacity: 1; visibility: visible; transform: none; }
.totop:hover { text-decoration: none; filter: brightness(1.08); }
.win-closeall { position: fixed; left: 16px; bottom: 20px; z-index: 95; display: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); box-shadow: var(--shadow); font: 500 13px var(--font); cursor: pointer; }
.win-closeall.show { display: block; }
@media (max-width: 720px) {
  .win { inset: 72px 8px 8px !important; width: auto !important; height: auto !important; }
  .win__grip, .win__light--max { display: none; }
  .zoom__front { padding: 24px 20px 40px; }
}

/* team gallery: masonry keeps every photo at its own proportions (no cropped faces) */
.chips--values { margin: 0 0 28px; }
.chips--values li { padding: 6px 16px; font-size: 14px; }
.gallery { columns: 3 300px; column-gap: 16px; }
.tile { position: relative; display: block; width: 100%; margin: 0 0 16px; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow); cursor: zoom-in; break-inside: avoid; color: #fff; transition: box-shadow .35s, transform .25s ease-out; will-change: transform; }
.tile:hover, .tile:focus-visible { box-shadow: 0 18px 50px var(--glow), var(--shadow); }
.tile picture, .tile img { display: block; width: 100%; height: auto; }
.tile img { pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; transition: transform .9s cubic-bezier(.2, .7, .2, 1), filter .5s; filter: saturate(.94); }
.tile:hover img, .tile:focus-visible img { transform: scale(1.07); filter: saturate(1.12); }
.tile__shield { position: absolute; inset: 0; }
.tile__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 44px 18px 16px; text-align: left; font: 600 15px var(--font); background: linear-gradient(180deg, transparent, rgba(8, 12, 26, .88)); transform: translateY(100%); opacity: 0; transition: transform .45s cubic-bezier(.2, .7, .2, 1), opacity .45s; pointer-events: none; }
.tile:hover .tile__cap, .tile:focus-visible .tile__cap { transform: none; opacity: 1; }
@media (hover: none) { .tile__cap { transform: none; opacity: 1; } }
.tile__mark { display: none; position: absolute; top: 10px; right: 12px; font: 500 10.5px var(--mono); letter-spacing: .04em; color: rgba(255, 255, 255, .62); text-shadow: 0 1px 3px rgba(0, 0, 0, .75); pointer-events: none; user-select: none; }
@media (min-width: 1024px) { .tile__mark { display: block; } }
@media (max-width: 560px) { .gallery { columns: 1; } }
@media print { .gallery, .lb { display: none; } }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.lb.is-open { opacity: 1; visibility: visible; }
.lb__bg { position: absolute; inset: 0; background: rgba(5, 8, 18, .9); backdrop-filter: blur(8px); }
.lb__fig { position: relative; margin: 0; max-width: min(94vw, 1100px); max-height: 90vh; display: flex; flex-direction: column; align-items: center; gap: 12px; transform: scale(.94); transition: transform .4s cubic-bezier(.2, .8, .2, 1), opacity .25s; }
.lb.is-open .lb__fig { transform: none; }
.lb__fig.is-swap { opacity: 0; transform: scale(.97); }
.lb__fig picture { position: relative; display: block; }
.lb__fig img { display: block; max-width: 94vw; max-height: calc(90vh - 56px); width: auto; height: auto; border-radius: 12px; box-shadow: 0 30px 90px rgba(0, 0, 0, .6); user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; pointer-events: none; }
.lb__shield { position: absolute; inset: 0; }
.lb__cap { color: #e8ecf8; font: 500 15px var(--font); text-align: center; }
.lb__cap small { margin-left: 10px; color: #9aa6c6; font: 500 12.5px var(--mono); }
.lb__x, .lb__nav { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(18, 25, 51, .75); color: #fff; font-size: 20px; cursor: pointer; z-index: 2; transition: background .2s, border-color .2s; }
.lb__x:hover, .lb__nav:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.lb__x { top: 16px; right: 16px; }
.lb__nav { top: 50%; margin-top: -22px; font-size: 26px; padding-bottom: 3px; }
.lb__prev { left: 16px; }
.lb__next { right: 16px; }
body.lb-open { overflow: hidden; }
@media (max-width: 720px) { .lb__nav { top: auto; bottom: 18px; margin: 0; } }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; border-left: 2px solid var(--line); display: grid; gap: 28px; }
.timeline li { position: relative; }
.timeline li::before { box-sizing: border-box; content: ""; position: absolute; left: -36px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.timeline time { font: 600 .85rem var(--mono); color: var(--accent); }
.timeline h3 { font-size: 1.15rem; margin: 4px 0 6px; }
.timeline h3 small { font-weight: 500; color: var(--muted); font-size: .95rem; margin-left: 6px; }
.timeline p { color: var(--muted); max-width: 75ch; margin: 0; }

/* contact */
.contact { text-align: center; padding: 56px 24px; background: linear-gradient(135deg, var(--surface), var(--accent-soft)); }
.contact h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); margin-bottom: 12px; }
.contact p { color: var(--muted); max-width: 52ch; margin: 0 auto 24px; }
.contact .cta { justify-content: center; }
.foot { display: flex; justify-content: space-between; padding: 40px 0; color: var(--muted); font-size: 14px; }

/* reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(48px) scale(.97); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); will-change: opacity, transform; }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .about, .projects { grid-template-columns: 1fr; }
  .project--feature .bullets { columns: 1; }
}
@media (max-width: 720px) {
  .nav__toggle { display: flex; }
  .nav__menu { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 12px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .nav__menu.open { display: flex; }
  .nav__menu a:not(.btn) { padding: 12px 0; }
  .nav__menu .theme { margin-top: 8px; }
  .grid--3 { grid-template-columns: 1fr; }
  .hero { padding-top: 56px; }
  .br-d { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print { .nav, .theme, .cta, .filters { display: none; } body { background: #fff; color: #000; } }
