/* ==========================================================================
   Shohzod — portfolio
   Header · full-screen hero with a Python code window · About · Services ·
   Projects · Contact · footer.

   Rules this file keeps:
   - Blue (--acc) is the single accent. Green / amber / violet are reserved
     for project status, so the "live" dot keeps its meaning.
   - Three text levels: --ink (titles), --soft (reading text), --mute
     (labels). Mono only for metadata: eyebrows, code, domains.
   - Every section opens the same way: "// eyebrow" + big title.
   - Type scale (px): 11 micro-mono · 12 mono labels · 13 mono text ·
     14 small · 15 secondary · 16 base · 18 reading/lead · 20 row titles ·
     display sizes via clamp(). No other font sizes.
   - Every text colour passes WCAG AA on --bg.
   - Works without JavaScript: the code is in the HTML, the mobile menu is a
     <details>. site.js only adds typing, the active menu item and closing.
   ========================================================================== */

:root {
  --bg: #0a0f1a;
  --bg2: #0d1422;
  --panel: #111a2b;
  --ink: #e8eef6;
  --soft: #aab4c3;
  --mute: #808b9b;
  --acc: #4c9aff;
  --acc-hover: #6eaeff;
  --acc-soft: #8cc0ff;
  --acc-ink: #04111f;
  --acc-wash: rgba(76, 154, 255, 0.1);
  --line: #1d2738;
  --line-strong: #2b3850;
  --card: rgba(76, 154, 255, 0.05);
  --ok: #3fb950;
  --dev: #d29922;
  --tool: #a371f7;

  --sans: "IBM Plex Sans Variable", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --header-h: 72px;
  --gutter: 40px;
  --radius: 16px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 8px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--soft);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* scrollbar in the site's own colours */
html { scrollbar-width: thin; scrollbar-color: var(--line-strong) var(--bg); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border: 3px solid var(--bg);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: var(--acc); }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, figure, pre { margin: 0; padding: 0; }
ul, ol { list-style: none; }

::selection { background: var(--acc); color: var(--acc-ink); }

:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: calc(1200px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--acc);
  color: var(--acc-ink);
  font-weight: 600;
  transition: top 0.15s;
}
.skip-link:focus { top: 12px; }

.dot {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.2);
}
/* the green "live" dots breathe like a server indicator */
@media (prefers-reduced-motion: no-preference) {
  .status-pill .dot,
  .row-domain .dot { animation: breathe 2.8s var(--ease) infinite; }
}
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.2); }
  50% { box-shadow: 0 0 0 7px rgba(63, 185, 80, 0.07); }
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  font: 600 15px/1.2 var(--sans);
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.btn-primary {
  background: var(--acc);
  border-color: var(--acc);
  color: var(--acc-ink);
  box-shadow: 0 10px 30px -12px rgba(76, 154, 255, 0.75);
}
.btn-primary:hover { background: var(--acc-hover); border-color: var(--acc-hover); transform: translateY(-1px); }
.btn-ghost { background: rgba(255, 255, 255, 0.02); }
.btn-ghost:hover { border-color: var(--acc); color: var(--acc); }
.btn-lg { padding: 17px 30px; font-size: 16px; border-radius: 12px; }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: rgba(10, 15, 26, 0.8);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header {
    background: rgba(10, 15, 26, 0.62);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
  }
}
.header-inner { display: flex; align-items: center; gap: 32px; height: var(--header-h); }

.logo { display: flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 600; font-size: 16px; }
.logo img { border-radius: 9px; box-shadow: 0 6px 18px -8px rgba(76, 154, 255, 0.9); }

.nav { display: flex; gap: 30px; margin-left: auto; }
.nav a {
  position: relative;
  padding: 6px 0;
  color: var(--soft);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--acc);
  transform: scaleX(0);
  transition: transform 0.25s var(--ease);
}
.nav a:hover,
.nav a.active { color: var(--ink); }
.nav a.active::after { transform: scaleX(1); }

.header-end { display: flex; align-items: center; gap: 14px; }

/* language: a pill toggle, the active language is a filled circle */
.lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}
.lang a {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--mute);
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.04em;
  transition: color 0.15s, background-color 0.15s;
}
.lang a:hover { color: var(--ink); }
.lang a.active { background: var(--acc); color: var(--acc-ink); }

/* mobile menu (<details>, no script needed) */
.menu { display: none; position: relative; }
.menu summary {
  display: grid;
  align-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
  list-style: none;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary span { display: block; height: 1.5px; border-radius: 2px; background: var(--ink); transition: transform 0.2s, opacity 0.2s; }
.menu[open] summary span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu[open] summary span:nth-child(2) { opacity: 0; }
.menu[open] summary span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  display: grid;
  min-width: 230px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.7);
}
.menu-panel a { padding: 12px 14px; border-radius: 9px; color: var(--ink); font-size: 16px; font-weight: 500; }
.menu-panel a:hover { background: rgba(255, 255, 255, 0.04); color: var(--acc); }
.menu-panel .menu-cta { margin-top: 6px; background: var(--acc); color: var(--acc-ink); text-align: center; }

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100svh - var(--header-h));
  padding: 56px 0 96px;
  overflow: hidden;
}
/* soft blue light top-left, a second one behind the code window */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px circle at 22% 30%, rgba(76, 154, 255, 0.12), transparent 60%),
    radial-gradient(600px circle at 78% 55%, rgba(76, 154, 255, 0.1), transparent 60%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 15px 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(17, 26, 43, 0.7);
  color: var(--soft);
  font: 600 12px/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--acc);
  font: 500 14px/1.4 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero .eyebrow { margin-top: 30px; }

.hello {
  margin-top: 14px;
  color: var(--ink);
  font-size: clamp(2.9rem, 1.6rem + 4.6vw, 5.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}
.hello em {
  font-style: normal;
  background: linear-gradient(100deg, #a9d0ff, var(--acc) 50%, #a9d0ff);
  background-size: 220% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .hello em:hover { animation: shimmer 1.4s var(--ease); }
}
@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -120% 0; }
}

.hero-sub { max-width: 31em; margin-top: 26px; font-size: 18px; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

/* right side: a round portrait with the code window under it */
.hero-visual { display: grid; gap: 28px; justify-items: center; }
.portrait {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 1;
  padding: 6px;
  border-radius: 50%;
  background: linear-gradient(140deg, #8cc0ff, rgba(76, 154, 255, 0.15) 55%, rgba(76, 154, 255, 0.5));
  box-shadow: 0 0 0 10px rgba(76, 154, 255, 0.06), 0 40px 90px -30px rgba(76, 154, 255, 0.6);
}
.portrait img {
  width: 100%;
  height: 100%;
  border: 4px solid var(--bg);
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
}
.hero-visual .code-window { width: 100%; max-width: 460px; }
.hero-visual .code { padding: 14px 18px 16px; font-size: 13px; line-height: 1.7; }

/* the code window */
.code-window {
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(13, 20, 34, 0.92);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(76, 154, 255, 0.06);
  overflow: hidden;
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.code-bar i { width: 12px; height: 12px; border-radius: 50%; }
.code-bar i:nth-child(1) { background: #ff5f57; }
.code-bar i:nth-child(2) { background: #febc2e; }
.code-bar i:nth-child(3) { background: #28c840; }
.code-bar span { margin-left: 10px; color: var(--mute); font: 400 12px/1 var(--mono); }

.code {
  padding: 22px 24px 26px;
  overflow-x: auto;
  color: #c9d4e3;
  font: 400 15px/1.85 var(--mono);
  tab-size: 4;
}
.code .ln { display: block; min-height: 1.85em; }
.code .k { color: #c792ea; }   /* keywords */
.code .c { color: #82aaff; }   /* class name */
.code .f { color: #82aaff; }   /* functions */
.code .a { color: #f78c6c; }   /* attributes */
.code .s { color: #c3e88d; }   /* strings */
.caret {
  display: inline-block;
  width: 8px;
  height: 1.15em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: var(--acc);
}
.caret.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  color: var(--mute);
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.mouse {
  position: relative;
  width: 22px;
  height: 34px;
  border: 1.5px solid currentColor;
  border-radius: 12px;
}
.mouse::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: currentColor;
}
@media (prefers-reduced-motion: no-preference) {
  .mouse::after { animation: wheel 1.8s var(--ease) infinite; }
}
@keyframes wheel {
  0% { opacity: 0; transform: translateY(-3px); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(8px); }
}
.scroll-hint:hover { color: var(--ink); }

/* -------------------------------------------------------------- sections */

.section { padding: 80px 0; border-top: 1px solid var(--line); }
.section:nth-of-type(even) { background: linear-gradient(180deg, var(--bg2), var(--bg)); }

.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head h2,
.contact-card h2 {
  margin-top: 14px;
  color: var(--ink);
  font-size: clamp(2rem, 1.3rem + 2.2vw, 3.1rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

/* about */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.facts { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.facts > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; padding: 16px 22px; }
.facts > div + div { border-top: 1px solid var(--line); }
.facts dt { color: var(--mute); font: 500 12px/1.6 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.facts dd { margin: 0; color: var(--ink); font-size: 15px; font-weight: 500; }
.about p { max-width: 40em; font-size: 18px; line-height: 1.75; }
.about p + p { margin-top: 18px; }
/* key phrases and product links: the eye can skim just these */
.about strong { color: var(--ink); font-weight: 500; }
.about a {
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid rgba(76, 154, 255, 0.5);
  transition: color 0.15s, border-color 0.15s;
}
.about a:hover { color: var(--acc); border-color: var(--acc); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chips li {
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--acc-wash);
  color: var(--acc-soft);
  font: 500 13px/1.5 var(--mono);
}

/* services */
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.service {
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17, 26, 43, 0.9), rgba(17, 26, 43, 0.35));
  transition: border-color 0.2s, transform 0.25s var(--ease);
}
.service:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.service-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(76, 154, 255, 0.35);
  border-radius: 12px;
  background: var(--acc-wash);
  color: var(--acc);
}
.service-icon svg { width: 23px; height: 23px; }
.service h3 { margin-top: 22px; color: var(--ink); font-size: 18px; line-height: 1.3; letter-spacing: -0.01em; }
.service p { margin-top: 9px; font-size: 15px; line-height: 1.6; }

.section-lead { max-width: 36em; margin-top: 14px; font-size: 18px; }

/* projects: a short, formal index — every row IS the link to the live site */
.rows { max-width: 920px; margin: 0; padding: 0; list-style: none; }
.rows > li + li { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 34px;
  gap: 10px 28px;
  align-items: center;
  margin: 0 -16px;
  padding: 24px 16px;
  border-radius: 14px;
  transition: background-color 0.2s;
}
a.row:hover { background: var(--card); }
.row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.15s;
}
a.row:hover .row-title { color: var(--acc); }
.row-desc { display: block; margin-top: 5px; font-size: 15px; line-height: 1.6; }
.row-domain {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--soft);
  font: 400 14px/1.4 var(--mono);
  overflow-wrap: anywhere;
}
.row-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--mute);
  font-size: 15px;
  transition: color 0.15s, border-color 0.15s, transform 0.25s var(--ease);
}
a.row:hover .row-arrow { color: var(--acc); border-color: var(--acc); transform: translate(2px, -2px); }
/* hovering one row dims the others, so the eye stays on it */
@media (hover: hover) {
  .rows:has(a.row:hover) a.row:not(:hover) { opacity: 0.55; }
  a.row { transition: background-color 0.2s, opacity 0.2s; }
}

.founder-tag {
  padding: 2px 9px;
  border: 1px solid rgba(76, 154, 255, 0.45);
  border-radius: 999px;
  color: var(--acc);
  font: 500 12px/1.6 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.status .dot { background: currentColor; box-shadow: none; }
.status-launch,
.status-dev { color: var(--dev); }
.status-tool { color: var(--tool); }


/* process: four numbered steps on one line */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: none; }
.step {
  position: relative;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.step-n {
  display: inline-block;
  color: var(--acc);
  font: 600 30px/1 var(--mono);
  letter-spacing: -0.02em;
}
/* a thin connector between the steps */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 42px;
  right: -19px;
  width: 20px;
  height: 1px;
  background: var(--line-strong);
}
.step h3 { margin-top: 18px; color: var(--ink); font-size: 18px; letter-spacing: -0.01em; }
.step p { margin-top: 8px; font-size: 15px; line-height: 1.6; }

/* --------------------------------------------------------------- contact */

.contact-card {
  position: relative;
  overflow: hidden;
  padding: 64px;
  border: 1px solid rgba(76, 154, 255, 0.3);
  border-radius: 24px;
  background:
    radial-gradient(ellipse 60% 100% at 100% 0%, rgba(76, 154, 255, 0.2), transparent 70%),
    var(--panel);
}
.contact-desc { max-width: 32em; margin-top: 14px; font-size: 18px; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-top: 34px; }
.contact-or { color: var(--mute); font-size: 15px; }
.email { color: var(--ink); font-family: var(--mono); border-bottom: 1px solid var(--line-strong); transition: color 0.15s, border-color 0.15s; }
.email:hover { color: var(--acc); border-color: var(--acc); }

.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.social-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--mute);
  transition: color 0.15s, border-color 0.15s;
}
.social-icon svg { width: 19px; height: 19px; }
.social-icon:hover { color: var(--acc); border-color: var(--acc); }

/* ---------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  padding-top: 30px;
  padding-bottom: 30px;
  color: var(--mute);
  font-size: 14px;
}
.footer-inner .logo { font-size: 15px; }
.git-line { color: var(--mute); font: 400 13px/1.5 var(--mono); }
.git-prompt { color: var(--acc); }
.footer-inner p:first-of-type { margin-right: auto; }

/* ------------------------------------------------------------- entrance */

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *,
  .portrait,
  .code-window { animation: rise 0.7s var(--ease) both; }
  .portrait { animation-delay: 0.1s; }
  .hero-copy > :nth-child(2) { animation-delay: 0.05s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.1s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.15s; }
  .hero-copy > :nth-child(5) { animation-delay: 0.2s; }
  .code-window { animation-delay: 0.35s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1180px) {
  .services,
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(2)::after { display: none; }
  .nav { gap: 22px; }
}

@media (max-width: 1024px) {
  .nav, .header-cta { display: none; }
  .header-end { margin-left: auto; }
  .menu { display: block; }
  .hero { min-height: 0; padding: 44px 0 92px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  /* tablets and phones: round photo + code side by side, above the text */
  .hero-visual { order: -1; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; justify-items: stretch; }
  .portrait { width: 200px; }
  .hero-visual .code-window { max-width: none; }
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; --header-h: 64px; }
  .site-header .logo span { display: none; }
  .hero { padding: 32px 0 84px; }
  .hero .eyebrow { margin-top: 24px; font-size: 13px; }
  .hero-sub { font-size: 16px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .btn-lg { padding: 15px 22px; font-size: 16px; }
  .code { white-space: pre-wrap; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 26px; }
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero-visual { gap: 12px; }
  .portrait { width: 116px; padding: 3px; box-shadow: 0 0 0 6px rgba(76, 154, 255, 0.06), 0 20px 40px -18px rgba(76, 154, 255, 0.6); }
  .portrait img { border-width: 3px; }
  .code-bar { gap: 5px; padding: 8px 10px; }
  .code-bar i { width: 8px; height: 8px; }
  .code-bar span { margin-left: 4px; font-size: 11px; }
  .hero-visual .code { padding: 10px 10px 12px; font-size: 11px; line-height: 1.6; }
  .hero-visual .code .ln { padding-left: 4ch; text-indent: -4ch; }
  .hero-visual .code .ln-extra { display: none; }   /* phones show the short version */
  .facts > div { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 14px 16px; }
  .about p { font-size: 16px; }
  .services { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .service { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 16px; padding: 20px; }
  .service-icon { grid-row: span 2; }
  .service h3 { margin-top: 0; font-size: 16px; }
  .service p { margin-top: 4px; font-size: 14px; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 4px; margin: 0; padding: 18px 0; border-radius: 0; }
  a.row:hover { background: none; }
  .row-arrow { display: none; }
  .row-domain { margin-top: 6px; font-size: 13px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .step { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; padding: 20px; }
  .step-n { grid-row: span 2; font-size: 22px; }
  .step h3 { margin-top: 0; font-size: 16px; }
  .step p { margin-top: 4px; font-size: 14px; }
  .step:not(:last-child)::after { display: none; }
  .section-lead { font-size: 16px; }
  .contact-card { padding: 36px 22px; border-radius: 20px; }
  .contact-desc { font-size: 16px; }
  .contact-actions .btn { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* only truly tiny screens (~320px): show the name first, photo and code after it */
@media (max-width: 339px) {
  .hero-visual { order: 0; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 16px; }
  .portrait { width: 156px; }
  .hero-visual .code-window { width: 100%; }
  .hero-visual .code { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
