/* ============================================================
   tomerbenbaron.com - Round 10: multi-page, cinematic, night-blue
   Deep blue-graphite base · aurora atmosphere (blue+violet, bg only)
   · single electric-blue accent · quiet thin type (round-9 scale)
   No gradients on text/buttons, no background loops.
   Radius vocabulary: 8px, 4px, full-round (chips + buttons only).
   ============================================================ */

:root {
  --bg: #0b0d1a;
  --bg-2: #0e1124;
  --surface: #12162e;
  --surface-2: #1a2040;
  --line: rgba(178, 180, 255, 0.10);
  --line-strong: rgba(178, 180, 255, 0.22);
  --text: #f2f5fb;
  --muted: rgba(222, 232, 252, 0.72);
  --faint: #93a0ba;
  --accent: #4da3ff;
  --violet: #8e7bff;
  --btn-bg: #f4f7ff;
  --btn-ink: #0a0d15;
  --scrim: 7, 10, 18;
  --radius: 8px;
  --radius-sm: 4px;
  --font-head: 'Heebo', system-ui, sans-serif;
  --font-body: 'Heebo', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --maxw: 1185px;
  /* Hebrew type: gentle negative tracking, aired headings */
  --ls-h1: -0.02em;
  --ls-h2: -0.02em;
  --ls-h3: -0.01em;
  --ls-body: -0.01em;
  --lh-head: 1.18;
  --lh-body: 1.5;
}

/* English page: the reference tracking and tight leading apply in full */
html[lang="en"] {
  --font-head: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --ls-h1: -0.055em;
  --ls-h2: -0.04em;
  --ls-h3: -0.04em;
  --ls-body: -0.03em;
  --lh-head: 1.08;
  --lh-body: 1.3;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: var(--ls-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* aurora atmosphere: violet-leaning neo glow + electric blue, backgrounds only */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1000px 620px at 82% -12%, rgba(142, 123, 255, 0.11), transparent 60%),
    radial-gradient(820px 560px at 6% 30%, rgba(77, 163, 255, 0.06), transparent 55%),
    radial-gradient(880px 620px at 60% 115%, rgba(142, 123, 255, 0.10), transparent 62%),
    var(--bg);
}

::selection { background: var(--text); color: var(--bg); }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

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

/* ---------- skip link ---------- */
.skip-link {
  position: fixed; top: -60px; inset-inline-start: 16px; z-index: 100;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 12px 18px; font-size: 14px; font-weight: 500;
  transition: top .2s;
}
.skip-link:focus-visible { top: 12px; }

/* ---------- nav: transparent at top, takes the band color beneath ---------- */
.nav { position: fixed; top: 0; inset-inline: 0; z-index: 50; transition: background .25s; }
.nav.scrolled { background: rgba(11, 13, 26, 0.94); }
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 28px;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 500; font-size: 14.5px; letter-spacing: -0.01em;
  font-family: var(--font-head); white-space: nowrap;
  color: var(--text); transition: color .2s;
}
.logo-tag {
  font-family: var(--font-mono); font-weight: 400; font-size: 10.5px;
  color: var(--faint); border: 1px solid var(--line-strong);
  border-radius: 100px; padding: 3px 9px; direction: ltr;
  transition: color .2s, border-color .2s;
}
.nav-links { display: flex; align-items: center; gap: 22px; list-style: none; }
.nav-links a { font-size: 13.5px; color: var(--muted); transition: color .2s; position: relative; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active:not(.nav-cta)::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -7px; height: 1px;
  background: currentColor;
}
.nav-cta {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--btn-bg); color: var(--btn-ink) !important;
  border-radius: 100px; padding: 7px 16px;
  font-size: 12.5px; font-weight: 500;
  transition: opacity .2s, background .2s, color .2s;
}
.nav-cta svg { width: 13px; height: 13px; }
.nav-cta:hover { opacity: .85; }
.lang-switch {
  font-family: var(--font-mono); font-size: 12px; padding: 7px 14px;
  border: 1px solid var(--line-strong); border-radius: 100px; color: var(--text) !important;
  transition: border-color .2s, color .2s;
}
.lang-switch:hover { border-color: var(--text); }

/* burger (mobile only) */
.nav-burger {
  display: none; width: 44px; height: 44px; border: 0; background: transparent;
  cursor: pointer; border-radius: var(--radius);
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.nav-burger span {
  display: block; width: 20px; height: 2px; background: var(--text);
  transition: transform .25s, opacity .25s, background .2s;
}
body.menu-open .nav-burger span:first-child { transform: translateY(4px) rotate(45deg); }
body.menu-open .nav-burger span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* the nav flips to ink while it overlaps a light band */
.nav.on-light { background: rgba(243, 239, 230, 0.96); }
.nav.on-light .nav-logo { color: #171719; }
.nav.on-light .logo-tag { color: #555555; border-color: rgba(0, 0, 0, 0.2); }
.nav.on-light .nav-links a { color: #393939; }
.nav.on-light .nav-links a:hover,
.nav.on-light .nav-links a.active { color: #171719; }
.nav.on-light .nav-cta { background: #171719; color: #fafafa !important; }
.nav.on-light .lang-switch { color: #171719 !important; border-color: rgba(0, 0, 0, 0.25); }
.nav.on-light .nav-burger span { background: #171719; }

/* full-screen mobile menu (the nav rises above it so the burger stays tappable) */
body.menu-open .nav { z-index: 65; }
.menu {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(9, 12, 20, 0.98);
  display: flex; flex-direction: column; justify-content: center;
  padding: 80px 28px 48px;
}
.menu[hidden] { display: none; }
.menu-links { display: flex; flex-direction: column; gap: 8px; }
.menu-links a {
  font-family: var(--font-head); font-weight: 300;
  font-size: clamp(30px, 8vw, 42px); letter-spacing: var(--ls-h2);
  color: var(--muted); padding: 8px 0; line-height: 1.25;
}
.menu-links a:hover, .menu-links a.active { color: var(--text); }
.menu-foot { margin-top: 40px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.menu-foot .lang-switch { padding: 13px 18px; }
@media (max-width: 860px) {
  .nav-burger { display: flex; }
  .nav-links { display: none; }
  .nav.scrolled, body.menu-open .nav { background: rgba(10, 13, 21, 0.94); }
  body.menu-open .nav.on-light { background: transparent; }
  body.menu-open .nav.on-light .nav-logo { color: var(--text); }
  body.menu-open .nav.on-light .nav-burger span { background: var(--text); }
}
@media (min-width: 861px) { .menu { display: none !important; } }

/* ---------- typography scale ---------- */
h1 {
  font-family: var(--font-head); font-weight: 300;
  font-size: clamp(38px, 4.9vw, 62px);
  line-height: var(--lh-head); letter-spacing: var(--ls-h1);
  margin-bottom: 24px;
}
h2 {
  font-family: var(--font-head); font-weight: 300;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: var(--ls-h2); line-height: var(--lh-head);
  margin-bottom: 16px;
}
h3 {
  font-family: var(--font-head); font-weight: 300;
  font-size: 28px; letter-spacing: var(--ls-h3); line-height: 1.2;
}
.eyebrow {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); }

/* ---------- buttons: quiet flat pills ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 7px 18px; border-radius: 100px;
  font-size: 13px; font-weight: 500;
  transition: opacity .2s, border-color .2s, color .2s;
}
.btn svg { width: 15px; height: 15px; flex: none; }
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); }
.btn-primary:hover { opacity: .85; }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
/* the 44px touch floor stays */
@media (pointer: coarse), (max-width: 700px) {
  .btn { min-height: 44px; padding: 10px 20px; }
}

/* ---------- home hero: portrait on aurora ---------- */
.hero { padding: 148px 0 72px; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(700px 480px at 78% 6%, rgba(142, 123, 255, 0.14), transparent 62%),
    radial-gradient(560px 460px at 14% 82%, rgba(77, 163, 255, 0.09), transparent 62%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.25fr 0.75fr;
  gap: 60px; align-items: center;
}
.hero-sub {
  font-size: 18px; color: var(--muted); max-width: 580px;
  margin-bottom: 34px; font-weight: 400;
}
.hero-facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 36px; max-width: 580px;
}
.fact {
  background: rgba(16, 22, 38, 0.75);
  border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 18px;
}
.fact-label {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 4px;
}
.fact-value { font-size: 14.5px; font-weight: 500; color: var(--text); line-height: 1.4; }
.live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  margin-inline-end: 7px; vertical-align: 1px;
}
.hero-photo { position: relative; justify-self: center; }
.photo-stage {
  position: relative;
  width: clamp(250px, 23vw, 330px);
  display: flex; align-items: flex-end; justify-content: center;
}
.photo-stage::before {
  content: ""; position: absolute; inset: 10% 5% 0; z-index: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%, rgba(142, 123, 255, 0.38), rgba(77, 163, 255, 0.12) 60%, transparent 80%);
  filter: blur(28px);
}
.photo-stage img {
  position: relative; z-index: 1;
  width: auto; height: clamp(340px, 30vw, 420px); max-width: 100%;
  object-fit: contain; object-position: bottom center; display: block;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media (max-width: 900px) {
  .hero { padding-top: 124px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 600px) {
  .hero { padding: 96px 0 48px; }
  .hero-grid { gap: 24px; }
  .photo-stage { width: 180px; }
  .photo-stage img { height: 260px; }
  .eyebrow { font-size: 11px; letter-spacing: 0.1em; margin-bottom: 18px; }
  .eyebrow::before { width: 20px; }
  .hero-sub { font-size: 17px; margin-bottom: 28px; }
  .hero-facts { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
  .fact:first-child { grid-column: span 2; }
}

/* ---------- inner-page hero (aurora, abstract, or full-bleed photo) ---------- */
.page-hero { padding: 150px 0 68px; position: relative; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(760px 500px at 80% -4%, rgba(77, 163, 255, 0.12), transparent 62%),
    radial-gradient(600px 480px at 10% 92%, rgba(142, 123, 255, 0.09), transparent 62%);
}
.page-hero .lead { color: var(--muted); font-size: 18.5px; max-width: 640px; }
.page-hero.media { padding: 0; min-height: 74vh; display: flex; align-items: flex-end; overflow: hidden; }
.page-hero.media::before { display: none; }
.page-hero.media .hero-media { position: absolute; inset: 0; z-index: -1; }
.page-hero.media .hero-media img {
  width: 100%; height: 112%; object-fit: cover; will-change: transform;
}
.page-hero.media .hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(var(--scrim), 0.45) 0%, rgba(var(--scrim), 0.28) 45%, rgba(var(--scrim), 0.88) 100%);
}
.page-hero.media .wrap { padding-bottom: 72px; padding-top: 190px; }
@media (max-width: 700px) {
  .page-hero { padding: 118px 0 48px; }
  .page-hero.media { min-height: 66vh; }
  .page-hero.media .wrap { padding-bottom: 48px; }
}

/* abstract cinematic hero: soft neo blur-scape in the site's own colors + grain */
.page-hero.abstract { padding: 118px 0 52px; overflow: hidden; }
.page-hero.abstract::before {
  content: ""; position: absolute; inset: -22%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(46% 38% at 76% 24%, rgba(142, 123, 255, 0.34), transparent 68%),
    radial-gradient(54% 46% at 14% 6%, rgba(77, 163, 255, 0.22), transparent 62%),
    radial-gradient(42% 38% at 52% 106%, rgba(142, 123, 255, 0.16), transparent 66%),
    linear-gradient(200deg, #151434, #0b0d1a 62%);
  filter: blur(44px);
}
.page-hero.abstract::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.05'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (max-width: 700px) { .page-hero.abstract { padding: 100px 0 42px; } }
/* the label needs extra brightness over the violet blobs */
.page-hero.abstract .eyebrow { color: #b8c2d9; }

/* ---------- sections + bands ---------- */
section, footer { scroll-margin-top: 64px; }
section { padding: 76px 0; }
.sec-head { margin-bottom: 52px; max-width: 640px; }
.sec-head p { color: var(--muted); font-size: 17.5px; }
.sec-link {
  margin-top: 22px; font-size: 14.5px; font-weight: 500; color: var(--text);
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
}
.sec-link svg { width: 16px; height: 16px; color: var(--accent); }
html[dir="rtl"] .sec-link svg { transform: scaleX(-1); }

/* the light band: warm cream, with a soft seam instead of a hard cut */
.band-light {
  --bg: #f3efe6;
  --bg-2: #ece7db;
  --surface: #fdfcf8;
  --surface-2: #ece7db;
  --line: rgba(62, 54, 34, 0.10);
  --line-strong: rgba(62, 54, 34, 0.24);
  --text: #191813;
  --muted: #55524a;
  --faint: #5f5c53;
  --accent: #2166c9;
  background: var(--bg);
  color: var(--text);
  position: relative;
  padding-top: 170px;
  padding-bottom: 170px;
}
.band-light > .wrap { position: relative; z-index: 1; }
/* top seam: a long aurora dissolve from the dark base into cream - no hard line */
.band-light::before {
  content: ""; position: absolute; top: 0; inset-inline: 0; height: 230px; z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    #0b0d1a 0%,
    rgba(24, 22, 52, 0.72) 32%,
    rgba(120, 112, 190, 0.16) 64%,
    rgba(243, 239, 230, 0) 100%);
}
/* bottom seam: cream dissolves back into the dark base, bridging into the film band */
.band-light::after {
  content: ""; position: absolute; bottom: 0; inset-inline: 0; height: 220px; z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(243, 239, 230, 0) 0%,
    rgba(120, 112, 190, 0.14) 40%,
    rgba(24, 22, 52, 0.74) 72%,
    #0b0d1a 100%);
}

/* full-bleed cinematic media band */
.media-band { position: relative; padding: 0; min-height: 66vh; display: flex; align-items: flex-end; overflow: hidden; }
.media-band .band-media { position: absolute; inset: 0; }
.media-band .band-media img, .media-band .band-media video {
  width: 100%; height: 112%; object-fit: cover; display: block; will-change: transform;
}
.media-band .band-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(var(--scrim), 0.74) 0%,
    rgba(var(--scrim), 0.34) 24%,
    rgba(var(--scrim), 0.18) 46%,
    rgba(var(--scrim), 0.9) 100%);
}
.media-band .band-content { position: relative; width: 100%; padding: 64px 0; }
.media-band h2, .media-band h3 { color: #f8fafc; }
.media-band p { color: rgba(255, 255, 255, 0.82); max-width: 560px; }
.media-band .eyebrow { color: rgba(255, 255, 255, 0.75); }
@media (max-width: 700px) { .media-band { min-height: 56vh; } }

/* ---------- the painted line ---------- */
.drive { padding: 64px 0; }
.drive-line {
  font-family: var(--font-head); font-weight: 300;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: var(--lh-head); letter-spacing: var(--ls-h2);
  max-width: 900px; color: var(--text);
}
.drive-line .dw { color: rgba(232, 240, 255, 0.22); transition: color .25s linear; }
.drive-line .dw.on { color: var(--text); }
@media (prefers-reduced-motion: reduce) {
  .drive-line .dw { color: var(--text); transition: none; }
}

/* ---------- cards (shared, flat) ---------- */
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
  padding: 28px; position: relative; overflow: hidden;
  transition: border-color .25s;
  display: flex; flex-direction: column;
}
.card:hover { border-color: var(--line-strong); }
.card-tag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line-strong); border-radius: 100px;
  padding: 4px 11px; display: inline-block; margin-bottom: 18px; width: fit-content;
}
.card h3 { font-size: 20px; font-weight: 400; margin-bottom: 12px; line-height: 1.3; }
.card p { color: var(--muted); font-size: 15.5px; flex: 1; line-height: 1.55; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip {
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 100px; padding: 4px 11px;
  direction: ltr;
}

/* teaser list (home): titles only, the bodies live on their page */
.teaser-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.teaser-list a.card { padding: 24px 28px; min-height: 96px; justify-content: center; }
.teaser-list a.card h3 { margin-bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.teaser-list a.card svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
html[dir="rtl"] .teaser-list a.card svg { transform: scaleX(-1); }
@media (max-width: 760px) { .teaser-list { grid-template-columns: 1fr; } }

/* ---------- bento (AI page: 6 / 4+2 / 3+3) - generous gaps so each
   project reads as its own ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 28px; }
.card.flag { grid-column: span 6; }
.card.b-wide { grid-column: span 4; }
.card.b2 { grid-column: span 2; }
.card.b3 { grid-column: span 3; }
.flag-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 34px; align-items: center; }
.flag-grid .chips { margin-top: 24px; }
.card.flag h3 { font-size: 26px; font-weight: 300; }
@media (max-width: 980px) {
  .bento { grid-template-columns: 1fr; }
  .card.flag, .card.b-wide, .card.b2, .card.b3 { grid-column: span 1; }
  .flag-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* the flagship terminal (typed reveal - one shot, no loops) */
.flag-visual {
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 20px 24px 24px; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);
  direction: ltr; text-align: left; line-height: 2.2; overflow: hidden;
}
.term-dots { display: flex; gap: 7px; margin-bottom: 12px; }
.term-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.flag-visual .ln { display: flex; gap: 10px; white-space: nowrap; }
@media (max-width: 480px) {
  .flag-visual { padding: 16px; font-size: 11.5px; line-height: 1.9; }
  .flag-visual .ln { white-space: normal; }
}
.flag-visual .ok { color: var(--text); }
.flag-visual .ac { color: var(--faint); }
.card.flag .flag-visual .ln { opacity: 0; transform: translateY(6px); }
.card.flag.vis .flag-visual .ln { animation: lnIn .4s ease-out forwards; }
.card.flag.vis .flag-visual .ln:nth-child(2) { animation-delay: .15s; }
.card.flag.vis .flag-visual .ln:nth-child(3) { animation-delay: .5s; }
.card.flag.vis .flag-visual .ln:nth-child(4) { animation-delay: .85s; }
.card.flag.vis .flag-visual .ln:nth-child(5) { animation-delay: 1.2s; }
.card.flag.vis .flag-visual .ln:nth-child(6) { animation-delay: 1.55s; }
@keyframes lnIn { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .card.flag .flag-visual .ln { opacity: 1; transform: none; animation: none !important; }
}

/* bento media */
.bento-photo {
  margin-top: 22px; width: 100%; height: 210px; object-fit: cover;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
}

/* course tile */
.cert-grid { display: grid; grid-template-columns: 170px 1fr; gap: 22px; align-items: center; }
.cert-visual {
  background: #f8fafc; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 22px 12px; display: flex; flex-direction: column; gap: 7px;
  text-align: center; direction: ltr;
}
.cert-visual .cv-brand { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: #64748b; }
.cert-visual .cv-line { font-family: var(--font-mono); font-size: 8px; letter-spacing: .22em; color: #64748b; }
.cert-visual .cv-name { font-family: var(--font-head); font-weight: 500; font-size: 17px; color: #0f172a; }
.cert-visual .cv-course { font-size: 12.5px; color: #334155; font-weight: 400; }
@media (max-width: 640px) { .cert-grid { grid-template-columns: 1fr; } }

/* ---------- metrics ---------- */
.metrics-box {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
  padding: 44px 40px 36px;
  margin-bottom: 44px;
}
.metrics-title {
  font-family: var(--font-head); font-size: 17px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--text); margin-bottom: 32px; text-align: center;
}
.metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.metric { text-align: center; position: relative; }
.metric + .metric::before {
  content: ""; position: absolute; inset-inline-start: -14px; top: 15%; height: 70%;
  width: 1px; background: var(--line);
}
.metric-num {
  font-family: var(--font-head); font-weight: 300;
  font-size: clamp(40px, 4.4vw, 60px); letter-spacing: -0.02em; line-height: 1.1;
  color: var(--text);
  direction: ltr; display: inline-block;
}
.metric-label { color: var(--text); font-size: 15px; margin-top: 6px; font-weight: 500; }
.metric-sub { color: var(--muted); font-size: 13px; margin-top: 5px; line-height: 1.5; }
.metrics-note {
  text-align: center; color: var(--muted); font-size: 13px; margin-top: 26px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
/* compact variant (home teaser): numbers only, no box */
.metrics-inline { margin: 0 0 8px; }
.metrics-inline .metrics-grid { max-width: 860px; }
@media (max-width: 860px) {
  .metrics-box { padding: 34px 22px 28px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 34px 20px; }
  .metrics-grid .metric:nth-child(3) { grid-column: span 2; }
  .metric + .metric::before { display: none; }
}

/* ---------- horizontal project strip: photo-first cards ---------- */
.strip {
  display: flex; gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip > .card {
  flex: 0 0 min(400px, calc(100% - 48px));
  scroll-snap-align: start;
}
@media (pointer: fine) {
  .strip { cursor: grab; }
  .strip.dragging { cursor: grabbing; scroll-snap-type: none; }
  .strip.dragging * { user-select: none; }
}
.strip-nav { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.strip-btn {
  width: 44px; height: 44px; border-radius: 100px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color .2s, opacity .2s;
}
.strip-btn svg { width: 17px; height: 17px; }
html[dir="rtl"] .strip-btn svg { transform: scaleX(-1); }
.strip-btn:hover:not(:disabled) { border-color: var(--text); }
.strip-btn:disabled { opacity: .35; cursor: default; }
@media (max-width: 860px) {
  .strip-nav { justify-content: center; margin-top: 24px; gap: 16px; }
  .strip-btn { width: 48px; height: 48px; border-color: var(--text); }
}

/* photo-first project card: image on top with the title on a scrim,
   body text and links keep living below - no word is lost */
.card.photo { padding: 0; background: var(--surface); }
.ph-media {
  position: relative; height: 250px; overflow: hidden; flex: none;
  border-bottom: 1px solid var(--line);
}
.ph-media img, .ph-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(var(--scrim), 0) 40%, rgba(var(--scrim), 0.82) 100%);
}
.ph-media .ph-title {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 1;
  padding: 18px 22px;
  color: #f8fafc; font-family: var(--font-head); font-weight: 400;
  font-size: 20px; letter-spacing: var(--ls-h3); line-height: 1.3;
}
.card.photo .ph-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
/* LinkedIn creative crossfade carousel (restored by request):
   6 slides, 4s each, runs only while in view, first slide stays static
   under reduced motion */
.ph-media.carousel img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; animation: carousel 24s infinite;
  animation-play-state: paused;
}
.ph-media.carousel.anim-run img { animation-play-state: running; }
.ph-media.carousel img:nth-child(1) { animation-delay: 0s; }
.ph-media.carousel img:nth-child(2) { animation-delay: 4s; }
.ph-media.carousel img:nth-child(3) { animation-delay: 8s; }
.ph-media.carousel img:nth-child(4) { animation-delay: 12s; }
.ph-media.carousel img:nth-child(5) { animation-delay: 16s; }
.ph-media.carousel img:nth-child(6) { animation-delay: 20s; }
@keyframes carousel {
  0% { opacity: 0; } 3% { opacity: 1; } 16.7% { opacity: 1; } 20.7% { opacity: 0; } 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ph-media.carousel img { animation: none; opacity: 0; }
  .ph-media.carousel img:first-child { opacity: 1; }
}

a.visual-link { display: block; }
.link-row { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }

.work-link {
  margin-top: 18px; font-size: 14px; font-weight: 500; color: var(--text);
  display: inline-flex; align-items: center; gap: 7px; min-height: 24px;
}
.work-link svg { width: 15px; height: 15px; color: var(--accent); }
@media (max-width: 700px) {
  .work-link { min-height: 44px; margin-top: 8px; }
}
html[dir="rtl"] .work-link svg { transform: scaleX(-1); }

/* film band content box */
.film-box { max-width: 560px; }
.film-box .work-link { color: #f8fafc; }
.film-box .work-link svg { color: var(--accent); }
.film-box .chips { margin-top: 18px; }
.film-box .chip { color: rgba(255, 255, 255, 0.75); border-color: rgba(255, 255, 255, 0.28); }

/* ---------- CTA band + contact ---------- */
.cta-band { padding: 60px 0 72px; text-align: center; position: relative; }
.cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(620px 380px at 50% 110%, rgba(142, 123, 255, 0.11), transparent 62%);
}
.cta-band h2 { margin-bottom: 22px; }
.cta-band .btn-row { justify-content: center; }

.contact-page { padding: 150px 0 40px; position: relative; }
.contact-page::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(700px 460px at 76% 0%, rgba(77, 163, 255, 0.12), transparent 62%),
    radial-gradient(560px 440px at 12% 100%, rgba(142, 123, 255, 0.09), transparent 62%);
}
.contact-box {
  border-radius: var(--radius); text-align: center;
  padding: 84px 28px 76px;
  background: rgba(16, 22, 38, 0.6);
  color: var(--text);
  border: 1px solid var(--line);
}
.contact-box h1, .contact-box h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 16px; }
.contact-box h1 span, .contact-box h2 span { color: inherit; }
.contact-box p { color: var(--muted); font-size: 18px; max-width: 560px; margin: 0 auto 38px; }
.contact-box .btn-row { justify-content: center; }
.contact-mail {
  display: inline-block; margin-top: 26px; font-family: var(--font-mono);
  font-size: 13px; color: var(--faint); direction: ltr;
  padding: 12px 16px; border-radius: 100px;
}
.contact-mail:hover { color: var(--text); }
@media (max-width: 600px) {
  .contact-box { padding: 58px 20px 52px; }
}

/* ---------- footer: one compact, comfortable bar ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  background: var(--bg-2);
}
.footer-inner {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 2px 6px;
}
.footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 4px; }
.footer-links a {
  color: var(--muted); font-size: 13.5px; padding: 12px 12px; min-height: 44px;
  display: inline-flex; align-items: center; transition: color .2s;
}
.footer-links a:hover { color: var(--text); }

/* ---------- reveals (scroll-reactive, one shot) ---------- */
.fade-up { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.fade-up.vis { opacity: 1; transform: none; }
/* the wonderful signature: headings resolve from blur */
.reveal { opacity: 0; filter: blur(14px); transform: translateY(12px); transition: opacity .85s ease, filter .85s ease, transform .85s ease; }
.reveal.vis { opacity: 1; filter: none; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .fade-up, .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .nav-burger span { transition: none; }
}

/* ---------- on-page agent (CSS only - logic untouched) ---------- */
.agent-fab {
  position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 70;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
  background: #f4f7ff; color: #0a0d15;
  border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 100px; padding: 10px 16px;
  font-family: var(--font-body); font-size: 13px; font-weight: 500; cursor: pointer;
  transition: opacity .2s, background .2s, color .2s, border-color .2s;
}
.agent-fab svg { width: 15px; height: 15px; }
.agent-fab:hover { opacity: .85; }
.agent-fab.on-light { background: #171719; color: #fafafa; border-color: #171719; }
.agent-panel {
  position: fixed; bottom: 84px; inset-inline-end: 20px; z-index: 71;
  width: min(380px, calc(100vw - 40px));
  height: min(540px, calc(100dvh - 120px));
  display: flex; flex-direction: column;
  background: #0d1120; border: 1px solid rgba(164, 190, 255, 0.22);
  border-radius: 8px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(4, 7, 14, .55);
}
.agent-panel[hidden] { display: none; }
.agent-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid rgba(164, 190, 255, 0.10);
  background: #101626;
}
.agent-head .term-dots { margin-bottom: 0; }
.agent-title { font-family: var(--font-mono); font-size: 12.5px; color: #f2f5fb; direction: ltr; }
.agent-mode {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: #93a0ba; border: 1px solid rgba(164, 190, 255, 0.22); border-radius: 100px; padding: 3px 8px;
}
.agent-close {
  margin-inline-start: auto; width: 34px; height: 34px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: #93a0ba; font-size: 20px; line-height: 1; cursor: pointer;
  transition: color .2s, background .2s;
}
.agent-close:hover { color: #f2f5fb; background: #16203a; }
.agent-msgs {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.msg { max-width: 88%; padding: 10px 14px; border-radius: 8px; font-size: 14px; line-height: 1.55; }
.msg.bot {
  align-self: flex-start; background: #16203a;
  border: 1px solid rgba(164, 190, 255, 0.10); color: #f2f5fb;
  border-start-start-radius: 4px;
}
.msg.bot a { color: #f2f5fb; text-decoration: underline; text-underline-offset: 2px; }
.msg.user {
  align-self: flex-end; background: #f4f7ff; color: #0a0d15;
  font-weight: 500; border-start-end-radius: 4px;
}
.msg.typing { display: inline-flex; gap: 5px; align-items: center; min-height: 20px; }
.tdot {
  width: 6px; height: 6px; border-radius: 50%; background: #93a0ba;
  animation: tblink 1s infinite;
}
.tdot:nth-child(2) { animation-delay: .18s; }
.tdot:nth-child(3) { animation-delay: .36s; }
@keyframes tblink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
.agent-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 10px; }
.agent-chip {
  font-family: var(--font-body); font-size: 12.5px; color: rgba(222, 232, 252, 0.72);
  background: transparent; border: 1px solid rgba(164, 190, 255, 0.22); border-radius: 100px;
  padding: 11px 14px; min-height: 44px; cursor: pointer; transition: border-color .2s, color .2s;
}
.agent-chip:hover { border-color: #f2f5fb; color: #f2f5fb; }
.agent-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid rgba(164, 190, 255, 0.10); }
.agent-input {
  flex: 1; background: #16203a; border: 1px solid rgba(164, 190, 255, 0.22);
  border-radius: 8px; padding: 11px 14px; color: #f2f5fb;
  font-family: var(--font-body); font-size: 14px; outline: none;
  transition: border-color .2s;
}
.agent-input:focus { border-color: #f2f5fb; }
.agent-input::placeholder { color: #93a0ba; }
.agent-send {
  width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%;
  background: #f4f7ff; color: #0a0d15; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: opacity .2s;
}
.agent-send svg { width: 17px; height: 17px; }
html[dir="rtl"] .agent-send svg { transform: scaleX(-1); }
.agent-send:hover { opacity: .85; }
.agent-note {
  padding: 0 16px 12px; text-align: center;
  font-size: 11px; color: #93a0ba;
}
@media (max-width: 600px) {
  .agent-fab { bottom: 14px; inset-inline-end: 14px; padding: 10px 15px; font-size: 12.5px; }
  .agent-panel { inset-inline: 12px; width: auto; bottom: 74px; height: min(520px, calc(100dvh - 96px)); }
}
@media (prefers-reduced-motion: reduce) {
  .tdot { animation: none; opacity: .6; }
}
