/* Weinberg Studio: the whole site's styles.
   Logical properties (inline-start/end instead of left/right) keep the layout right for Hebrew (right to left)
   and for English and Spanish (left to right). Sizes in rem, so the accessibility menu can scale the text. */

:root {
  /* Midnight blue, almost black, with ivory text and champagne gold: quiet and elegant, not loud.
     Dark theme: every text color keeps at least 4.5:1 contrast on --bg and --panel. */
  color-scheme: dark;
  --bg: #0B1324;
  --panel: #101A30;
  --panel-2: #18243F;
  --line: #26334F;
  --ink: #0B1324;
  --text: #EEE9DF;
  --text-dim: #B5BBC9;
  --text-faint: #8E96AB;
  --green: #7CCFA0;
  --green-dim: rgba(124, 207, 160, 0.16);
  /* champagne gold: --accent for fills (buttons, dots) with --on-accent text on top; --accent-text for small gold text */
  --accent: #C9A96E;
  --accent-text: #D6B97F;
  --accent-light: #E6D2A6;
  --on-accent: #0B1324;
  --accent-dim: rgba(201, 169, 110, 0.12);
  /* Headings in serif: Cormorant Garamond (Latin) and Frank Ruhl Libre (Hebrew letters: Cormorant has none) */
  --font-big: 'Cormorant Garamond', 'Frank Ruhl Libre', Georgia, serif;
  --font-display: 'Space Grotesk', 'Heebo', sans-serif;
  --font-body: 'Inter', 'Heebo', sans-serif;
  --font-mono: 'JetBrains Mono', 'Heebo', monospace;
  --container: 1120px;
  /* heights of the sticky menu and of the technologies strip: main.js writes the real ones, these are the fallback */
  --header-h: 4rem;
  /* height of the project images: they shrink on short windows so the whole section fits in one screen */
  --card-img-h: clamp(70px, calc((100svh - 630px) / 2), 170px);
  --marquee-h: 3.4rem;
  --radius: 14px;
  /* card background: it changes in the lighter bands (see "Sections") so the cards stay visible */
  --card: #101A30;
}

* { box-sizing: border-box; }
/* the display rules of the cards would win over the hidden attribute */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -3rem;
  background: var(--accent); color: var(--on-accent); padding: 0.6rem 1rem;
  border-radius: 6px; font-weight: 600; text-decoration: none;
  transition: top 0.2s ease; z-index: 100;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

/* Phone numbers, emails and code stay left to right inside Hebrew text */
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 19, 36, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  position: relative;
  max-width: var(--container); margin: 0 auto; padding: 0.9rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap;
}
.bsd {
  /* top right corner, on the same line as the menu, in every language (physical right, also in Hebrew) */
  position: absolute; right: 1.4rem; top: 0.9rem; line-height: 1.6;
  font-family: 'Frank Ruhl Libre', 'Heebo', serif; font-size: 1rem; color: var(--accent-text);
}
.header-inner { padding-right: 4.4rem; }
.logo { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; direction: ltr; white-space: nowrap; color: var(--text); }
/* the name written like a signature (Allison), in gold */
.logo__text { font-family: 'Allison', cursive; font-weight: 400; font-size: 2.1rem; line-height: 1; color: var(--accent); padding-top: 0.2rem; transition: color 0.15s ease; }
.logo:hover .logo__text { color: var(--accent-light); }
.site-nav ul { display: flex; gap: 1.05rem; flex-wrap: wrap; }
.site-nav a {
  font-size: 0.86rem; text-decoration: none; color: var(--text-dim);
  transition: color 0.15s ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.header-tools { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.status-pill {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 0.8rem;
  white-space: nowrap;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.dot-pulse { box-shadow: 0 0 0 0 var(--green-dim); animation: pulse 2.2s ease-out infinite; }

/* Language switcher: עב · EN · ES */
.lang-switch ul { display: flex; gap: 0.25rem; }
.lang-switch a {
  display: inline-block; min-width: 2.2rem; text-align: center;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-dim);
  text-decoration: none; padding: 0.3rem 0.45rem; border-radius: 6px; border: 1px solid transparent;
}
.lang-switch a:hover { color: var(--text); border-color: var(--line); }
.lang-switch a[aria-current="true"] { color: var(--accent-text); border-color: var(--line); }

@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(124, 207, 160, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(124, 207, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 207, 160, 0); }
}

/* ---------- Hero ---------- */
/* padding-block only: the side padding comes from .wrap (the first design lost it on phones) */
.hero {
  padding-block: 3rem;
  /* the first screen is one whole page: menu + hero + strip fill the window exactly (svh = the visible height on phones) */
  min-height: calc(100vh - var(--header-h) - var(--marquee-h));
  min-height: calc(100svh - var(--header-h) - var(--marquee-h));
  display: flex; flex-direction: column; justify-content: center;
}
/* Label in a pill, with a dot and (in the sections) the number: "● 01  WHAT I OFFER" */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 500;
  color: var(--accent-text); border: 1px solid rgba(201, 169, 110, 0.35);
  text-transform: uppercase; letter-spacing: 0.16em;
  border-radius: 999px; padding: 0.45rem 1rem; margin-bottom: clamp(0.6rem, 1.8vh, 1.3rem); line-height: 1.4;
}
.hero .eyebrow::before {
  content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent);
}
/* Big capital headings in Anton, the last word in the accent color (accentTitle in src/lib/i18n.ts) */
.hero h1, .section-head h2, .contact-pitch h2 {
  font-family: var(--font-big); font-weight: 500; letter-spacing: -0.01em; line-height: 1.05;
}
.accent { color: var(--accent); font-style: italic; }
/* the explanation under the title (Services and Projects): small and light, in italics */
.head-lead {
  font-family: var(--font-big); font-style: italic; font-weight: 400; line-height: 1.35; margin: 0.3rem 0 0;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: var(--text-dim);
}
/* Cormorant's numbers are old style (a "1" looks like a small I): use the normal ones */
.stat .num, .service-card::before, .step::before { font-variant-numeric: lining-nums; font-feature-settings: "lnum"; }
/* Hebrew has no italic: a slanted Hebrew letter would look wrong */
:lang(he) .accent { font-style: normal; }
.hero h1 { font-size: clamp(3rem, 8vw, 6rem); line-height: 1; margin-bottom: 1rem; }
.hero .role {
  font-family: var(--font-body); font-size: clamp(1rem, 2vw, 1.2rem); font-weight: 500;
  color: var(--text-dim); margin-bottom: 1.6rem; letter-spacing: 0.04em;
}
.hero .pitch { max-width: 680px; font-size: 1.12rem; color: var(--text); margin-bottom: 2.4rem; }
.hero .pitch strong { color: var(--accent-text); font-weight: 600; }

/* Centered text, the numbers go below, full width */
.hero-grid { margin-bottom: 4rem; text-align: center; }
.hero-grid .pitch { margin-inline: auto; }
.hero-grid .cta-row { justify-content: center; }
.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.stat {
  padding: 1.4rem 1.4rem 1.2rem; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.stat .num {
  font-family: var(--font-big); font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1.05;
  color: var(--text); display: block; font-weight: 500;
}
/* the numbers are left to right (.ltr), so in Hebrew they must be pushed to the right edge by hand */
[dir="rtl"] .stat .num { text-align: right; }
.stat .label { font-size: 0.85rem; color: var(--text-dim); }

.cta-row { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.7rem; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 0.95rem; border: 1.5px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-light); border-color: var(--accent-light); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--card); }
.btn-ghost:hover { border-color: var(--accent); }

/* ---------- Marquee (technologies strip under the hero) ---------- */
/* Thin and quiet: small letters between two lines, the edges fade out */
.marquee {
  border-block: 1px solid var(--line); color: var(--text-dim); overflow: hidden; direction: ltr; padding-block: 0.95rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 50s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__list { display: flex; flex-shrink: 0; }
.marquee__list li {
  font-size: 0.78rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.18em;
  white-space: nowrap; display: flex; align-items: center;
}
.marquee__list li::after {
  content: ""; width: 0.3rem; height: 0.3rem; border-radius: 50%; background: var(--accent);
  margin-inline: 1.8rem;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
/* Every section is a full-width band. The odd ones (1st, 3rd...) keep the beige page background and the even
   ones are lighter, with a line on top and below, so it is clear where one ends and the next one starts.
   The content is kept inside --container by the side padding. */
main { counter-reset: section; }
/* Page by page (home page, mouse or touchpad): main.js moves one section per scroll gesture. */
.hero, .section {
  max-width: none; margin: 0;
  padding-inline: max(1.5rem, calc((100% - var(--container)) / 2 + 1.5rem));
}
.section {
  padding-block: clamp(1.4rem, 4.2vh, 3.2rem); border-top: 1px solid var(--line); background: var(--bg);
  /* every section is at least one whole screen (below the menu), with its content in the middle, so it never
     shows cut in half; a taller section just grows. The menu links land on its top. */
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex; flex-direction: column; justify-content: center;
}
.section:nth-of-type(even) {
  --card: var(--bg);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.section-head { margin-bottom: clamp(1rem, 3vh, 2rem); }
.section-head h2 { font-size: clamp(2rem, min(5vw, 6.5vh), 3.8rem); }
/* number in the label: "● 01  WHAT I OFFER" (the text after "/" is what screen readers get: nothing) */
.section .eyebrow::before { counter-increment: section; content: "\25CF  0" counter(section) / ""; }
.section-head .lead { color: var(--text-dim); max-width: 640px; margin-top: 0.9rem; font-size: 1rem; }
/* Only hidden when JavaScript runs (the "js" class), so without JS everything is still visible */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Glint on the last letter of "Some of my projects" (like the shine on a smile) ---------- */
#portfolio-title .accent { position: relative; }
#portfolio-title .accent::before, #portfolio-title .accent::after {
  content: ""; position: absolute; inset-inline-end: -0.3em; top: -0.1em; width: 0.95em; height: 0.95em;
  pointer-events: none; opacity: 0; transform: scale(0);
}
#portfolio-title .accent::before { background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, rgba(230, 210, 166, 0.25) 40%, transparent 70%); width: 1.8em; height: 1.8em; top: -0.5em; inset-inline-end: -0.7em; }
#portfolio-title .accent::after {
  background: #fff;
  clip-path: polygon(50% 0, 56% 44%, 100% 50%, 56% 56%, 50% 100%, 44% 56%, 0 50%, 44% 44%);
}
#portfolio-title.glint-on .accent::before { animation: glint-glow 1.2s ease-out 0.1s both; }
#portfolio-title.glint-on .accent::after { animation: glint 1.2s ease-out 0.1s both; }
@keyframes glint {
  0% { opacity: 0; transform: scale(0) rotate(-45deg); }
  35% { opacity: 1; transform: scale(1.2) rotate(0deg); }
  60% { opacity: 1; transform: scale(0.9) rotate(10deg); }
  100% { opacity: 0; transform: scale(0) rotate(45deg); }
}
@keyframes glint-glow {
  0% { opacity: 0; transform: scale(0); }
  35% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.4); }
}

/* ---------- Filter buttons (they only appear with JavaScript; without it everything is shown) ---------- */
.filters { display: none; gap: 0.6rem; flex-wrap: wrap; margin-bottom: clamp(1rem, 2.6vh, 1.8rem); }
.js .filters { display: flex; }
.chip {
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600; color: var(--text); cursor: pointer;
  padding: 0.7rem 1.4rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.chip:hover { border-color: var(--accent); }
/* the project filter: the chosen button is dark, like in the reference */
.chip.is-active { background: var(--text); border-color: var(--text); color: var(--bg); }

/* ---------- Services ---------- */
.service-group__head { margin-bottom: clamp(0.2rem, 0.8vh, 0.6rem); }
.service-group__head h3 { font-size: 1.2rem; }
.service-group__head p { color: var(--text-dim); font-size: clamp(0.85rem, 2vh, 0.95rem); margin-top: 0.3rem; max-width: 640px; }
.service-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; align-items: start; }
/* each column has its own gold line on top, so the two kinds of client are clearly apart */
.service-group { border-top: 2px solid var(--accent); padding-top: 0.8rem; }
.service-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.8rem; }
/* each service is a flat row: the number on the left, then the title, the text and the tags */
.service-grid { counter-reset: service; gap: 0; }
/* the plain-words column counts from 01; the technical one from 00, like a computer */
.service-group--teams .service-grid { counter-reset: service -1; }
.service-card {
  counter-increment: service; display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); column-gap: 0.4rem; row-gap: 0.3rem;
  padding: clamp(0.4rem, 1.1vh, 0.75rem) 0; border-bottom: 1px solid var(--line);
}
.service-card > * { grid-column: 2; }
.service-card::before {
  grid-column: 1; grid-row: 1 / span 3; align-self: start;
  content: "0" counter(service) / ""; font-family: var(--font-big); font-style: italic; font-size: 1.6rem; line-height: 1.1; color: var(--accent);
}
.service-card h4 { font-family: var(--font-display); font-size: 1.08rem; margin: 0; }
.service-card p { color: var(--text-dim); font-size: clamp(0.8rem, 1.9vh, 0.88rem); line-height: 1.4; }
.service-card .tag-list { padding-top: 0.2rem; gap: 0.4rem; }
.service-card .tag-list li { font-size: 0.76rem; padding: 0.15rem 0.7rem; }
.project-card:hover, .cap-card:hover { border-color: var(--accent); }

/* ---------- Portfolio ---------- */
/* the filter buttons go under the title and its explanation */
#portfolio { padding-block: clamp(1.2rem, 3.2vh, 2.4rem); }
#portfolio .project-grid { gap: 1.1rem; }

/* 2 big cards, then 3 smaller ones. The filter dims the cards that don't match, it doesn't remove them. */
.project-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.4rem; }
.project-card { grid-column: span 2; position: relative; }
.project-card:nth-child(-n+2) { grid-column: span 3; }
.project-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease, opacity 0.35s ease, filter 0.35s ease;
}
.project-card:hover { transform: translateY(-3px); }
.project-card.is-dim { opacity: 0.3; filter: grayscale(1); }
.project-card__media { position: relative; height: var(--card-img-h); overflow: hidden; background: var(--panel-2); }
.project-card__shot {
  width: 100%; height: 100%; object-fit: cover; object-position: top; display: block;
  transition: transform 0.5s ease;
}
.project-card:hover .project-card__shot { transform: scale(1.04); }
/* projects without a screenshot: two big letters */
.project-card__initials {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-big); font-size: clamp(3.5rem, 8vw, 5.5rem); letter-spacing: 0.04em; color: rgba(238, 233, 223, 0.08);
}
.project-card__body { padding: 0.9rem 1.2rem 1.1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.project-card__type { font-size: 0.7rem; font-weight: 600; color: var(--accent-text); text-transform: uppercase; letter-spacing: 0.12em; }
.project-card h3 { font-family: var(--font-big); font-weight: 600; font-size: 1.55rem; line-height: 1.1; margin: 0; }
.tag-list.tag-list--one-line { flex-wrap: nowrap; overflow: hidden; }
.tag-list--one-line li { white-space: nowrap; flex-shrink: 0; }
.tag-list li.tag-more { background: transparent; border: 1px dashed var(--line); color: var(--text-faint); }
.project-card__open { all: unset; cursor: pointer; }
.project-card__open::after { content: ""; position: absolute; inset: 0; }
.project-card__open:focus-visible::after { outline: 2px solid var(--accent-text); outline-offset: -2px; border-radius: 16px; }
.project-status {
  position: absolute; top: 0.8rem; inset-inline-start: 0.8rem;
  display: inline-flex; align-items: center; gap: 0.45rem; background: var(--card);
  font-size: 0.72rem; font-weight: 600; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.7rem; white-space: nowrap;
}
.project-status--live { color: var(--green); border-color: rgba(124, 207, 160, 0.4); }
.project-status--upcoming { color: var(--accent-text); border-color: rgba(214, 185, 127, 0.45); }

/* Window with the details of a project (<dialog>, opened by main.js) */
.project-modal {
  width: min(820px, calc(100% - 2rem)); max-height: calc(100% - 2rem); padding: 0; border: 1px solid var(--line);
  border-radius: 18px; background: var(--card); color: var(--text); overflow: auto;
}
.project-modal::backdrop { background: rgba(3, 10, 30, 0.72); backdrop-filter: blur(2px); }
.project-modal__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.4rem; border-bottom: 1px solid var(--line); background: var(--bg);
}
.project-modal__bar h3 { font-family: var(--font-big); font-weight: 600; font-size: 1.6rem; }
.project-modal__close {
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
}
.project-modal__close:hover { border-color: var(--accent); }
.project-modal__body { padding: 1.4rem; display: flex; flex-direction: column; gap: 1.2rem; }
.project-modal__media { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--panel-2); }
.project-modal__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 0; }
.project-modal__meta dt { font-size: 0.7rem; font-weight: 600; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.12em; }
.project-modal__meta dd { margin: 0.2rem 0 0; font-weight: 600; font-size: 0.95rem; overflow-wrap: anywhere; }
.project-modal__text { color: var(--text-dim); }
.project-modal__link { align-self: flex-start; }

/* ---------- Process (how I work) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; counter-reset: step; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem; counter-increment: step;
}
.step::before {
  content: "0" counter(step) / ""; display: block;
  font-family: var(--font-big); font-style: italic; font-size: 2.1rem; line-height: 1; color: var(--accent); margin-bottom: 0.8rem;
}
.step h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.step p { color: var(--text-dim); font-size: 0.92rem; }

/* ---------- Shooting star in "How I work" (drawn by main.js) ---------- */
#process { position: relative; overflow: clip; }
#process > :not(.shooting-star) { position: relative; z-index: 1; }
.shooting-star { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; transition: opacity 0.9s ease; }
.shooting-star.is-fading { opacity: 0; }

/* ---------- Timeline / experience ---------- */
.timeline { display: flex; flex-direction: column; gap: 0; }
.experience-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); column-gap: 3rem; align-items: stretch; }
.experience-layout .section-head { margin-bottom: clamp(1rem, 3vh, 2rem); }
/* the label of the right column sits at the bottom of the title row, so both lists start on the same line */
.experience-layout .earlier-title { align-self: end; margin-bottom: clamp(1rem, 3vh, 2rem); }
/* both lists are as tall as the taller one: the last row grows, so the lines at the bottom match too */
.timeline, .earlier-career { display: flex; flex-direction: column; }
.timeline .job:last-child, .earlier-career .earlier-item:last-child { flex: 1; }
.job {
  display: grid; grid-template-columns: 150px 1fr; gap: 1.2rem;
  padding: 0.8rem 0; border-top: 1px solid var(--line);
}
.job:last-child { border-bottom: 1px solid var(--line); }
.job-meta { display: flex; align-items: flex-start; gap: 0.6rem; padding-top: 0.2rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 0.4rem; flex-shrink: 0; }
.dot-active { background: var(--green); }
.dot-done { background: var(--text-faint); }
.job-date { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-dim); }
.job-body h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.2rem; }
.job-body h3 .role { font-family: var(--font-body); font-weight: 400; color: var(--text-dim); font-size: 1rem; }
.job-body p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.45; margin-bottom: 0.5rem; }
.job-tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.job-tag-list li {
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.1rem 0.6rem;
}

.earlier-career { margin-top: 0; }
.earlier-title {
  font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 1rem;
}
.earlier-item {
  padding: 0.9rem 0; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 0.9rem;
}
.earlier-item:last-child { border-bottom: 1px solid var(--line); }
.earlier-item .company { font-weight: 600; }
.earlier-item .role { color: var(--text-dim); }
.earlier-item .date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-faint); flex-basis: 100%; }
.earlier-item p { flex-basis: 100%; color: var(--text-dim); font-size: 0.92rem; margin-top: 0.2rem; }

/* ---------- Capabilities ---------- */
.cap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.cap-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem;
}
.cap-card h3 { font-size: 1rem; margin-bottom: 0.9rem; color: var(--text); }
.cap-card h3 .eyebrow-tag { display: block; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.3rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-list li {
  font-size: 0.82rem; color: var(--text-dim); background: var(--panel-2);
  border-radius: 999px; padding: 0.3rem 0.8rem;
}

/* ---------- Ace of spades in "Aces up my sleeve" ---------- */
/* the card sits behind the cards of the grid, so it looks like it is coming out from under them */
#capabilities .section-head { position: relative; z-index: 0; }
#capabilities .cap-grid { position: relative; z-index: 1; }
.ace {
  position: absolute; inset-inline-end: 8%; bottom: calc(-1 * (clamp(1rem, 3vh, 2rem) + 38px)); width: 88px;
  transform: rotate(8deg); transition: transform 0.4s ease;
}
.ace:hover { transform: translateY(-10px) rotate(4deg); }
/* when the magic trick can run, the card stays hidden until it comes out of the word "Aces" (main.js) */
@media (prefers-reduced-motion: no-preference) { .js .ace { opacity: 0; } }
html.a11y-motion .ace { opacity: 1 !important; transform: rotate(8deg) !important; }
.ace svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5)); }

/* ---------- "Experience" turns to ice and lets off cold vapor (main.js) ---------- */
#experience { position: relative; overflow: clip; }
#experience-title.frost { animation: frost 3.4s ease-in-out both; }
@keyframes frost {
  0%, 100% { color: var(--text); text-shadow: none; }
  20%, 65% { color: #E2F0FF; text-shadow: 0 0 2px #ffffff, 0 0 16px rgba(170, 215, 255, 0.8), 0 0 34px rgba(120, 180, 255, 0.35); }
}
.vapor {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 2; opacity: 0; filter: blur(7px);
  background: radial-gradient(circle, rgba(226, 240, 255, 0.6) 0%, rgba(200, 225, 255, 0.25) 45%, rgba(200, 225, 255, 0) 70%);
}

/* ---------- "Education": a thin gold line draws itself under the word, then a soft shine runs along it (main.js) ---------- */
.edu-word { position: relative; display: inline-block; }
.edu-word::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -0.12em; height: 2px; border-radius: 1px; pointer-events: none;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 40%, #FFF6DC 50%, var(--accent) 60%, var(--accent) 100%);
  background-size: 300% 100%; background-position: 100% 0; transform-origin: left;
}
[dir="rtl"] .edu-word::after { transform-origin: right; }
/* with JavaScript the line waits, hidden, until the section comes into view (without it, or with motion off, it is just there) */
.js #education-title:not(.is-drawn) .edu-word::after { transform: scaleX(0); }
html.a11y-motion #education-title .edu-word::after { transform: none !important; }
#education-title.is-drawn .edu-word::after { animation: edu-draw 1.8s cubic-bezier(.25,.8,.3,1) both, edu-shine 1.6s ease-in-out 1.7s both; }
@keyframes edu-draw { from { transform: scaleX(0); opacity: 0.4; } to { transform: scaleX(1); opacity: 1; } }
@keyframes edu-shine { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------- The ace's magic: smoke and sparks (made by main.js) ---------- */
#capabilities { position: relative; overflow: clip; }
#capabilities .section-head h2 { position: relative; z-index: 1; }
.puff {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 3; opacity: 0; filter: blur(5px);
  background: radial-gradient(circle, rgba(238, 233, 223, 0.55) 0%, rgba(238, 233, 223, 0.25) 45%, rgba(238, 233, 223, 0) 70%);
}
.mote {
  position: absolute; width: 4px; height: 4px; border-radius: 50%; pointer-events: none; z-index: 3; opacity: 0;
  background: var(--accent-light); box-shadow: 0 0 8px var(--accent);
}

/* ---------- Phoenix on the contact form: flies in, lands, turns, spreads its wings, catches fire and goes up in smoke (main.js) ---------- */
.contact-form { position: relative; }
/* room above the form for the phoenix, its open wings and its flames, so the menu doesn't cover it (two columns only;
   the form stretches to the height of the left column, so the section doesn't grow) */
@media (min-width: 761px) { .contact-form { margin-top: 6rem; } }
.phoenix { position: absolute; inset-inline-end: 2rem; bottom: calc(100% - 15px); width: 140px; z-index: 2; pointer-events: none; }
.phoenix svg {
  display: block; width: 100%; height: auto; overflow: visible;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4)); transition: filter 1.2s ease;
}
/* resting pose (also what you see without JavaScript or with reduced motion): wings folded along the body.
   The open wings turn and stretch from the shoulder; folded, they are squashed flat there and hidden. */
.phoenix__wing { transition: opacity 0.3s ease; }
.phoenix__open {
  transform-origin: 112px 54px; transform: scale(0.45, 0.08); opacity: 0;
  transition: transform 0.35s ease-in, opacity 0.3s ease;
}
.phoenix__letter { transform-origin: 0 0; transform: rotate(12deg); }
/* flying: the open wings beat (down past the body and up again); legs tucked in */
.phoenix.is-flying .phoenix__wing { opacity: 0; }
.phoenix.is-flying .phoenix__open { opacity: 1; transition: none; }
.phoenix.is-flying .phoenix__open--near { animation: phoenix-flap 0.34s ease-in-out infinite alternate; }
.phoenix.is-flying .phoenix__open--far { animation: phoenix-flap 0.34s ease-in-out -0.06s infinite alternate; }
.phoenix.is-flying .phoenix__legs { opacity: 0; }
@keyframes phoenix-flap { from { transform: scale(1, 1); } to { transform: scale(1, -0.45); } }
.phoenix.is-perched .phoenix__letter { animation: letter-sway 1.6s ease-in-out 2 alternate; }
@keyframes letter-sway { from { transform: rotate(6deg); } to { transform: rotate(20deg); } }
/* landed: it turns to face you (the side view squashes away and the front view opens out of it) and then spreads its
   wings up and out from the shoulders, slowly, with a little overshoot */
.phoenix__side, .phoenix__front { transform-origin: 104px 70px; transition: transform 0.2s ease-in, opacity 0.8s ease; }
.phoenix__front { transform: scaleX(0); }
.phoenix__spread { opacity: 0; transform: scale(0.25, 0.1); transition: transform 0.3s ease-in, opacity 0.2s ease; }
.phoenix__spread--left { transform-origin: 92px 50px; }
.phoenix__spread--right { transform-origin: 108px 50px; }
.phoenix.is-open .phoenix__side { transform: scaleX(0); }
.phoenix.is-open .phoenix__front { transform: none; transition: transform 0.2s ease-out 0.2s, opacity 0.8s ease; }
.phoenix.is-open .phoenix__spread {
  opacity: 1; transform: none;
  transition: transform 1s cubic-bezier(.2, .9, .3, 1.15) 0.35s, opacity 0.25s ease 0.35s;
}
/* the fire: a bonfire that grows from its feet (GROW in main.js) until the bird can't be seen behind it */
.phoenix__blaze { opacity: 0; transform-origin: 100px 106px; transform: scale(0.08); }
.phoenix.is-ablaze .phoenix__blaze { opacity: 1; transform: none; transition: transform 3s ease-in-out, opacity 0.4s ease; }
.phoenix.is-ablaze svg { filter: drop-shadow(0 0 12px rgba(255, 140, 40, 0.65)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4)); }
.phoenix.is-engulfed .phoenix__front { opacity: 0; }
.flame { transform-box: fill-box; transform-origin: 50% 100%; }
.phoenix.is-ablaze .flame { animation: flame-flicker 0.55s ease-in-out var(--delay, 0s) infinite alternate; }
.phoenix.is-ablaze .phoenix__glow { animation: glow-pulse 0.9s ease-in-out infinite alternate; }
@keyframes flame-flicker { from { transform: scale(0.9, 1.1) skewX(-5deg); } to { transform: scale(1.08, 0.88) skewX(4deg); } }
@keyframes glow-pulse { from { opacity: 0.75; } to { opacity: 1; } }
/* the poof, like the ace's: the flame swells and vanishes (main.js adds the smoke; POOF in main.js) */
.phoenix.is-poof svg { transform-origin: 59% 45%; animation: phoenix-poof 0.5s ease-out forwards; }
@keyframes phoenix-poof { to { transform: scale(1.6); opacity: 0; } }
.phoenix.is-gone svg { visibility: hidden; }
/* "Stop animations" in the accessibility menu: the phoenix just sits on the form, from the side */
html.a11y-motion .phoenix svg { visibility: visible !important; opacity: 1 !important; transform: none !important; }
html.a11y-motion .phoenix__side { transform: none !important; }
html.a11y-motion .phoenix__front, html.a11y-motion .phoenix__blaze { display: none; }
.ember {
  position: absolute; width: 3px; height: 3px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: #FFC03A; box-shadow: 0 0 6px #F0541E;
}

/* ---------- Page dots: where you are on the home page (main.js) ---------- */
.page-dots { display: none; }
@media (min-width: 1100px) {
  .page-dots { position: fixed; right: 1.1rem; top: 50%; transform: translateY(-50%); z-index: 20; display: flex; flex-direction: column; gap: 0.15rem; }
  .page-dots a { position: relative; display: block; width: 1.4rem; height: 1.4rem; }
  .page-dots a::before {
    content: ""; position: absolute; inset: 0; margin: auto; width: 0.42rem; height: 0.42rem; border-radius: 50%;
    background: var(--text-faint); transition: background 0.2s ease, transform 0.2s ease;
  }
  .page-dots a:hover::before { background: var(--text); }
  .page-dots a.is-current::before { background: var(--accent); transform: scale(1.6); }
  /* the name of the section, on hover or keyboard focus */
  .page-dots a::after {
    content: attr(data-label); position: absolute; right: 1.6rem; top: 50%; transform: translateY(-50%); white-space: nowrap;
    font-size: 0.75rem; color: var(--text-dim); background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
    padding: 0.15rem 0.7rem; opacity: 0; pointer-events: none; transition: opacity 0.15s ease;
  }
  .page-dots a:hover::after, .page-dots a:focus-visible::after { opacity: 1; }
  .page-dots a:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -2px; border-radius: 50%; }
  /* in Hebrew the accessibility button is on the right: the dots go to the other edge */
  html[dir="rtl"] .page-dots { right: auto; left: 1.1rem; }
  html[dir="rtl"] .page-dots a::after { right: auto; left: 1.6rem; }
}

/* ---------- Education ---------- */
.edu-list { display: flex; flex-direction: column; }
.edu-item { padding: 1.3rem 0; border-top: 1px solid var(--line); }
.edu-item:last-child { border-bottom: 1px solid var(--line); }
.edu-item .edu-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.35rem; }
.edu-item h3 { font-size: 1.02rem; font-weight: 600; }
.edu-item .program { color: var(--text-dim); font-weight: 400; }
.edu-item .date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-faint); white-space: nowrap; }
.edu-item p { color: var(--text-dim); font-size: 0.9rem; max-width: 640px; }

/* ---------- Languages ---------- */
.lang-row { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 2rem; }
.lang-chip {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.5rem 1rem; font-size: 0.88rem;
}
.lang-chip .level { font-family: var(--font-mono); font-size: 0.74rem; color: var(--accent-text); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 3rem; align-items: stretch; }
.contact-side { display: flex; flex-direction: column; gap: 2rem; }
.contact-pitch h2 { font-size: clamp(2.1rem, 4vw, 3rem); margin-bottom: 1rem; }
.contact-pitch p { color: var(--text-dim); margin-bottom: 1.4rem; max-width: 420px; }
.contact-pitch .status-pill { display: inline-flex; }

/* The message form: a white card, fields in the page's beige */
.contact-form { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 2rem; display: flex; flex-direction: column; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto 1fr; gap: 1.1rem 1.2rem; margin-bottom: 1.4rem; flex: 1; }
.field { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: 0.88rem; font-weight: 600; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 0.95rem; color: var(--text); width: 100%;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 1rem;
}
.field--wide textarea { flex: 1; min-height: clamp(7rem, 20vh, 14rem); resize: vertical; }
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.form-submit { width: 100%; justify-content: center; font-size: 1rem; padding: 1rem; cursor: pointer; }
.form-submit:disabled { opacity: 0.6; cursor: wait; }
.form-status { margin-top: 0.9rem; font-size: 0.92rem; font-weight: 500; }
.form-status:empty { display: none; }
.form-status.is-ok { color: var(--green); }
.form-status.is-error { color: var(--accent-text); }
.form-note { margin-top: 0.8rem; font-size: 0.82rem; color: var(--text-faint); text-align: center; }
.contact-list { display: flex; flex-direction: column; gap: 0.7rem; }
.contact-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem 1rem; background: var(--panel-2); border-radius: 8px;
  border: 1px solid transparent; transition: border-color 0.15s ease;
}
.contact-row:hover { border-color: var(--line); }
.contact-label { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.contact-label svg { flex-shrink: 0; color: var(--accent-text); }
.contact-text { display: flex; flex-direction: column; min-width: 0; }
.contact-text .k { font-size: 0.72rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.contact-text .v { font-family: var(--font-mono); font-size: 0.88rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.contact-action {
  font-size: 0.8rem; font-weight: 600; color: var(--accent-text); text-decoration: none;
  white-space: nowrap; border: 1px solid var(--line); padding: 0.4rem 0.8rem; border-radius: 6px;
  background: transparent; cursor: pointer; font-family: inherit;
  min-height: 2.25rem; display: inline-flex; align-items: center;
}
.contact-action:hover { border-color: var(--accent-text); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2rem; margin-top: 1rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.82rem; color: var(--text-faint); }
.footer-inner .tag { font-family: var(--font-mono); direction: ltr; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }

/* ---------- WhatsApp button (floating) ---------- */
.wa-float {
  position: fixed; inset-inline-end: 1.2rem; bottom: 1.2rem; z-index: 40;
  width: 3.25rem; height: 3.25rem; border-radius: 50%;
  display: grid; place-items: center;
  background: #25D366; color: var(--ink);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.wa-float svg { width: 1.7rem; height: 1.7rem; fill: currentColor; }
.wa-float:hover { transform: translateY(-1px); }

/* ---------- Blog ---------- */
.page-head { padding-block: 4rem 1rem; }
.page-head h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); margin-bottom: 0.6rem; }
.page-head .lead { color: var(--text-dim); max-width: 640px; }

.post-list { display: flex; flex-direction: column; gap: 1.2rem; padding-bottom: 4rem; }
.post-card {
  display: grid; grid-template-columns: 220px 1fr; gap: 1.4rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem; position: relative;
}
.post-card--no-cover { grid-template-columns: 1fr; }
.post-card__cover { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; }
.post-card h2 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.post-card h2 a { text-decoration: none; }
.post-card h2 a:hover { color: var(--accent-text); }
.post-card time, .post-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-faint); }
.post-card p { color: var(--text-dim); font-size: 0.94rem; margin-top: 0.5rem; }
.post-card__more { display: inline-block; margin-top: 0.8rem; color: var(--accent-text); font-size: 0.88rem; font-weight: 600; text-decoration: none; }
.post-draft {
  display: inline-block; font-family: var(--font-mono); font-size: 0.74rem; color: var(--on-accent);
  background: var(--accent); border-radius: 6px; padding: 0.15rem 0.5rem; margin-bottom: 0.5rem;
}
.blog-empty { color: var(--text-dim); padding-bottom: 4rem; }

.post { padding-block: 3rem 4rem; }
.post__inner { max-width: 760px; }
.post__back a { color: var(--text-dim); font-size: 0.88rem; }
.post h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin: 1.2rem 0 0.6rem; }
.post-meta { margin-bottom: 1.8rem; }
.post-translations { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 1.8rem; }
.post__cover { width: 100%; height: auto; border-radius: var(--radius); margin-bottom: 2rem; }

.prose { font-size: 1.04rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.prose h3 { font-size: 1.2rem; margin-top: 1.8rem; }
.prose a { color: var(--accent-text); }
.prose ul, .prose ol { padding-inline-start: 1.4rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4rem; }
.prose blockquote { margin: 1.4rem 0; padding: 0.4rem 1.2rem; border-inline-start: 3px solid var(--accent-text); color: var(--text-dim); }
.prose code { font-family: var(--font-mono); font-size: 0.9em; background: var(--panel-2); padding: 0.1rem 0.35rem; border-radius: 4px; }
.prose pre { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; overflow-x: auto; direction: ltr; text-align: left; }
.prose pre code { background: none; padding: 0; }
.prose img { max-width: 100%; height: auto; border-radius: 8px; }

.post-cta {
  margin-top: 3rem; padding: 1.8rem; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.post-cta h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.post-cta p { color: var(--text-dim); margin-bottom: 1.2rem; }

/* ---------- Accessibility statement and other text pages ---------- */
.legal { padding-block: 3rem 4rem; }
.legal__inner { max-width: 760px; }
.legal h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin-bottom: 1rem; }
.legal h2 { font-size: 1.3rem; margin: 2rem 0 0.7rem; }
.legal p, .legal li { color: var(--text-dim); }
.legal p + p { margin-top: 0.7rem; }
.legal ul { list-style: disc; padding-inline-start: 1.4rem; }
.legal li + li { margin-top: 0.4rem; }
.legal a { color: var(--accent-text); }
.legal__updated { margin-top: 2.4rem; font-family: var(--font-mono); font-size: 0.8rem; }

/* ---------- 404 ---------- */
.not-found { padding-block: 6rem; }
.not-found h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.7rem; }
.not-found p { color: var(--text-dim); margin-bottom: 2rem; }

/* Short windows (a laptop): a tighter first page, so that it still fits in one screen */
@media (max-height: 820px) and (min-width: 761px) {
  .hero { padding-block: 1.2rem; }
  .hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin-bottom: 0.6rem; }
  .hero .eyebrow { margin-bottom: 0.8rem; }
  .hero .role { margin-bottom: 0.9rem; }
  .hero .pitch { font-size: 1rem; margin-bottom: 1.3rem; }
  .hero-grid { margin-bottom: 1.6rem; }
  .stat { padding: 0.8rem 1.1rem; }
  .stat .num { font-size: 2rem; }
}

@media (max-width: 1100px) {
  /* the title and the side block no longer fit in one row: the side block goes under the title, aligned like it */
}

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .job { grid-template-columns: 1fr; gap: 0.5rem; }
  .experience-layout { grid-template-columns: minmax(0, 1fr); }
  .experience-layout .earlier-title { margin-top: 2.2rem; }
  .cap-grid, .service-columns, .steps { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card, .project-card:nth-child(-n+2) { grid-column: auto; }
  .project-card__media { height: auto; aspect-ratio: 16 / 10; }
  .project-modal__meta { grid-template-columns: 1fr; }
  /* minmax(0, 1fr): the column may shrink below its content (the long email), so the page doesn't scroll sideways */
  .contact-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-form { padding: 1.4rem; }
  .contact-row { flex-wrap: wrap; }
  /* Phones: the header stays small. The menu is one line that scrolls sideways, and the clock
     is hidden here (it's also in the contact section). */
  .header-inner { padding-block: 0.7rem 0; row-gap: 0.4rem; }
  .bsd { top: 0.7rem; }
  .site-nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .site-nav ul { flex-wrap: nowrap; gap: 1.1rem; padding-bottom: 0.6rem; }
  .site-nav a { white-space: nowrap; }
  .header-tools .status-pill { display: none; }
  .post-card { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  .dot-pulse { animation: none; }
  .ace { transition: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js #education-title:not(.is-drawn) .edu-word::after { transform: none; }
}
