/* nirkosover.com — faithful copy of the Wix layout (reference viewport 1440px). */
:root {
  --pink: #FF7CA9;        /* Contact ring + text */
  --pink-cv: #F879A7;     /* CV dates */
  --ink: #000;
  --ink-soft: #2F2E2E;
  --ink-btn: #232323;
  --display: "Outfit", "Arial Black", sans-serif;
  --body: "Raleway", "Heebo", "Helvetica Neue", Arial, sans-serif;
  --script: "Damion", cursive;
  /* 1 Wix px at the reference width. Capped at 1440 so the layout stops growing
     on wide screens — it must stay in sync with .page's max-width below, or the
     content overflows the centered page box and gets clipped. */
  --unit: calc(min(100vw, 1440px) / 1440);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--body); font-weight: 400; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
/* Animated background (site/bg.js). Sits above the static .bg fallback, still behind content. */
.bg-canvas { position: fixed; inset: 0; z-index: -1; display: block; width: 100%; height: 100%;
             opacity: 0; transition: opacity .9s ease; }
.bg-canvas.is-ready { opacity: 1; }
.bg { position: fixed; inset: 0; z-index: -2; background: #f4f4f4 url("/assets/bg.jpg") center / cover no-repeat; filter: blur(5px); transform: scale(1.04); }

/* Keep max-width identical to the cap in --unit above. */
.page { position: relative; margin: 0 auto; width: 100%; max-width: 1440px; min-height: 100vh; }

.footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
          gap: calc(16 * var(--unit)); margin: 0 calc(56 * var(--unit));
          padding: calc(28 * var(--unit)) 0 calc(40 * var(--unit));
          border-top: 1px solid rgba(35,35,35,.12); font-size: calc(15 * var(--unit)); color: var(--ink-soft); }
.footer-links { display: flex; gap: calc(26 * var(--unit)); }
.footer a { text-decoration: none; transition: color .3s ease; }
.footer a:hover { color: var(--pink); }

/* ---------- Home ---------- */
.home .hero { position: relative; padding-top: calc(116 * var(--unit)); }
.home .portrait { position: absolute; left: calc(-180 * var(--unit)); top: calc(88 * var(--unit)); width: calc(482 * var(--unit)); height: calc(482 * var(--unit)); border-radius: 50%; overflow: hidden; z-index: 0; }
.home .portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* WebGL ripple layer (site/bg.js) painted over the still portrait. */
.home .portrait canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block;
                         opacity: 0; transition: opacity .6s ease; }
.home .portrait canvas.is-ready { opacity: 1; }
.home h1 { position: relative; z-index: 1; margin: 0 0 0 calc(225 * var(--unit)); font-family: var(--display); font-weight: 900; font-size: calc(180 * var(--unit)); line-height: .9; letter-spacing: 0; }
.home .contact { position: absolute; top: calc(102 * var(--unit)); left: calc(1086 * var(--unit)); width: calc(179 * var(--unit)); height: calc(179 * var(--unit)); border: 2px solid var(--pink); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--pink); font-size: calc(17 * var(--unit)); text-decoration: none; z-index: 2;
                transition: transform .45s cubic-bezier(.22,.61,.36,1), background .45s ease, color .45s ease; }
.home .contact:hover { background: var(--pink); color: #fff; transform: scale(1.06); }
/* Width and size are tuned together so the three authored lines each hold on
   one line at the reference width (and, since both scale with --unit, at every
   width above the mobile breakpoint). */
.home .tagline { margin: calc(44 * var(--unit)) calc(100 * var(--unit)) 0 calc(225 * var(--unit)); max-width: calc(1060 * var(--unit)); font-size: calc(44 * var(--unit)); line-height: 1.2; color: var(--ink-soft); }
.home .bio { margin: calc(56 * var(--unit)) calc(230 * var(--unit)) 0; max-width: calc(620 * var(--unit)); font-size: calc(21 * var(--unit)); line-height: 1.65; }
.home .bio p { margin: 0 0 calc(26 * var(--unit)); }
.home .bio a { color: var(--ink); }
.home .links { margin: calc(46 * var(--unit)) calc(230 * var(--unit)) calc(110 * var(--unit)); display: flex; gap: calc(30 * var(--unit)); flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: calc(12 * var(--unit));
       border-radius: 999px; background: #fff; color: var(--ink-btn); text-decoration: none;
       font-family: var(--body); border: 1px solid transparent;
       transition: background .35s ease, color .35s ease, border-color .35s ease; }
.btn .arrow { width: 1em; height: 1em; transition: transform .35s cubic-bezier(.22,.61,.36,1); }
.btn:hover .arrow { transform: translate(2px, -2px); }
.btn-primary { background: var(--ink-btn); color: #fff; }
.btn-primary:hover { background: var(--pink); color: var(--ink); }
.btn-ghost { background: transparent; border-color: rgba(35,35,35,.35); }
.btn-ghost:hover { border-color: var(--pink); color: var(--pink); }
.home .btn { height: calc(54 * var(--unit)); padding: 0 calc(30 * var(--unit)); font-size: calc(17 * var(--unit)); }


/* ---------- CV ---------- */
.cv .title { position: relative; margin: 0; padding-top: calc(110 * var(--unit)); }
.cv h1 { margin: 0 0 0 calc(177 * var(--unit)); font-family: var(--display); font-weight: 900; font-size: calc(180 * var(--unit)); line-height: .9; white-space: nowrap; }
.cv .avatar { position: absolute; top: calc(138 * var(--unit)); left: calc(476 * var(--unit)); width: calc(150 * var(--unit)); height: calc(150 * var(--unit)); border-radius: 50%; overflow: hidden; }
.cv .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv .entries { margin: calc(85 * var(--unit)) 0 calc(70 * var(--unit)); }
.cv .entry { display: grid; grid-template-columns: calc(251 * var(--unit)) 1fr; margin-left: calc(230 * var(--unit)); margin-bottom: calc(96 * var(--unit)); font-size: calc(24 * var(--unit)); color: var(--ink-soft); }
.cv .when { grid-column: 1 / -1; font-family: var(--script); color: var(--pink-cv); line-height: 1.2; margin-bottom: 3px; }
.cv .who { line-height: 1.2; padding-right: calc(16 * var(--unit)); }
.cv .who b { font-weight: 700; display: block; }
.cv .what { max-width: calc(576 * var(--unit)); line-height: 1.4; }
.cv .what p { margin: 0 0 1.4em; }
.cv .what p:last-of-type { margin-bottom: 0; }
.cv .what .btn { margin-top: calc(19 * var(--unit)); height: calc(44 * var(--unit)); padding: 0 calc(24 * var(--unit)); font-size: calc(14 * var(--unit)); border-color: rgba(35,35,35,.35); }

/* ---------- Small screens: keep the composition, stop shrinking type below readable ---------- */
@media (max-width: 760px) {
  :root { --unit: calc(100vw / 760); }
  .footer { margin: 0 5vw; padding: 20px 0 32px; font-size: 13px; flex-direction: column; align-items: flex-start; }
  .footer-links { gap: 18px; }
  .home .portrait { left: -34vw; top: 14vw; width: 56vw; height: 56vw; }
  .home h1 { margin-left: 6vw; font-size: 15vw; }
  .home .contact { left: auto; right: 4vw; top: 7vw; width: 26vw; height: 26vw; font-size: 14px; }
  .home .tagline { margin: 14vw 6vw 0; max-width: none; font-size: 7vw; }
  .home .bio { margin: 8vw 6vw 0; font-size: 18px; }
  .home .links { margin: 8vw 6vw 20vw; gap: 3vw; }
  .home .btn { height: 48px; padding: 0 20px; font-size: 15px; }
  .cv h1 { margin-left: 2vw; font-size: 15vw; }
  .cv .avatar { top: 17vw; left: 27vw; width: 13vw; height: 13vw; }
  .cv .entries { margin-top: 12vw; }
  .cv .entry { grid-template-columns: 1fr; margin: 0 6vw 12vw; font-size: 18px; }
  .cv .who { padding: 0; margin-bottom: 1em; }
  .cv .what .btn { height: 42px; padding: 0 18px; font-size: 14px; }
}

/* ---------- Articles ---------- */
.article-page { max-width: 760px; margin: 0 auto; padding: 40px 20px 100px; }
.article-page .back { display: inline-block; margin-bottom: 40px; font-size: 16px; text-decoration: none; }
.article-page h1 { font-family: var(--display); font-weight: 900; font-size: clamp(36px, 6vw, 72px); line-height: 1.1; margin: 0 0 16px; }
.article-page .meta { color: var(--ink-soft); font-size: 15px; margin-bottom: 40px; }
.article-body { font-size: 20px; line-height: 1.6; color: var(--ink-soft); }
.article-body h2 { font-size: 30px; line-height: 1.2; margin: 1.6em 0 .5em; color: var(--ink); }
.article-body h3 { font-size: 23px; margin: 1.4em 0 .4em; color: var(--ink); }
.article-body p, .article-body ul, .article-body ol { margin: 0 0 1.2em; }
.article-body img { max-width: 100%; height: auto; display: block; margin: 1.5em 0; }
.article-body blockquote { margin: 1.5em 0; padding-inline-start: 1em; border-inline-start: 3px solid var(--pink); color: var(--ink); }
.article-body pre { background: #111; color: #eee; padding: 16px; overflow: auto; font-size: 15px; border-radius: 4px; direction: ltr; text-align: left; }
.article-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.article-body a { color: var(--ink); text-decoration-color: var(--pink); }
[lang="he"] .article-page, [lang="he"] .article-body { font-family: "Heebo", var(--body); }
.articles-index h1 { font-family: var(--display); font-weight: 900; font-size: clamp(48px, 8vw, 120px); line-height: 1.1; margin: 0 0 40px; }
.articles-index h2 { font-size: 20px; text-transform: uppercase; letter-spacing: .1em; color: var(--pink-cv); margin: 48px 0 16px; }
.articles-index ul { list-style: none; padding: 0; margin: 0; }
.articles-index li { padding: 18px 0; border-top: 1px solid #ddd; }
.articles-index li a { font-size: 24px; text-decoration: none; }
.articles-index li a:hover { text-decoration: underline; text-decoration-color: var(--pink); }
.articles-index li .meta { display: block; margin-top: 4px; font-size: 14px; color: var(--ink-soft); }
.articles-index li .desc { display: block; margin-top: 6px; font-size: 17px; color: var(--ink-soft); }
.articles-index [dir="rtl"] { direction: rtl; text-align: right; font-family: "Heebo", var(--body); }

/* ---------- Entrance ---------- */
.loader { position: fixed; inset: 0; z-index: 100; background: #fff; display: grid; place-items: center;
          animation: loader-out .6s ease 1.5s both; }
.loader-ring { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--pink);
               animation: loader-pulse 1.1s cubic-bezier(.45,0,.55,1) infinite; }
.is-ready .loader { animation: loader-out .6s ease both; }
@keyframes loader-pulse {
  0%   { transform: scale(.6); opacity: .25; }
  50%  { transform: scale(1);  opacity: 1; }
  100% { transform: scale(.6); opacity: .25; }
}
@keyframes loader-out { to { opacity: 0; visibility: hidden; } }

@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes circle-in { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: none; } }

.home .portrait { animation: circle-in 1s cubic-bezier(.22,.61,.36,1) .35s both; }
.home h1        { animation: rise .9s cubic-bezier(.22,.61,.36,1) .45s both; }
.home .contact  { animation: fade-in .8s ease 1.1s both; }
.home .tagline  { animation: rise .9s cubic-bezier(.22,.61,.36,1) .6s both; }
.home .bio      { animation: rise .9s cubic-bezier(.22,.61,.36,1) .72s both; }
.home .links    { animation: rise .9s cubic-bezier(.22,.61,.36,1) .84s both; }
.footer         { animation: fade-in .9s ease .95s both; }
.cv .title      { animation: rise .9s cubic-bezier(.22,.61,.36,1) .45s both; }
.cv .entries    { animation: rise .9s cubic-bezier(.22,.61,.36,1) .6s both; }

@media (prefers-reduced-motion: reduce) {
  .loader { display: none; }
  .home .portrait, .home h1, .home .contact, .home .tagline, .home .bio, .home .links,
  .footer, .cv .title, .cv .entries { animation: none; }
}
