/* shayatik.com: hand-written, no framework */
:root {
  --bg: #fbfaf7;
  --bg-alt: #f2efe8;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #5d5a53;
  --line: #e4e0d6;
  --accent: #0f766e;
  --accent-strong: #0b5c56;
  --accent-soft: #d8efe9;
  --hl: #f3c969;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28, 27, 25, .05), 0 8px 24px rgba(28, 27, 25, .06);
  --max: 1120px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Hebrew", sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #121513;
  --bg-alt: #181c1a;
  --surface: #1d2220;
  --text: #ecebe6;
  --muted: #a3a69f;
  --line: #2c3330;
  --accent: #4fd1bf;
  --accent-strong: #7fe0d2;
  --accent-soft: #173a35;
  --hl: #b38a2e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 10px; left: 10px; z-index: 100; background: var(--surface); padding: .5rem 1rem; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 1rem; height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); font-weight: 750; letter-spacing: -.01em; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent); color: var(--bg); font-size: .85rem; font-weight: 800; letter-spacing: .02em;
}
.nav { margin-left: auto; }
.nav ul { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: .45rem .8rem; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 550; }
.nav a:hover, .nav a.active { color: var(--text); background: var(--bg-alt); }
.nav a.nav-cta { color: var(--bg); background: var(--text); margin-left: .35rem; }
.nav a.nav-cta:hover { background: var(--accent); color: #fff; }
.nav-toggle { display: none; }
.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer;
}
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
[data-theme="light"] .i-sun, [data-theme="dark"] .i-moon { display: none; }

@media (max-width: 820px) {
  .nav { order: 3; margin-left: 0; }
  .brand { margin-right: auto; }
  .nav-toggle {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  }
  .nav-toggle span[aria-hidden], .nav-toggle span[aria-hidden]::before, .nav-toggle span[aria-hidden]::after {
    display: block; width: 16px; height: 2px; background: var(--text); border-radius: 2px; position: relative; transition: transform .2s;
  }
  .nav-toggle span[aria-hidden]::before, .nav-toggle span[aria-hidden]::after { content: ""; position: absolute; left: 0; }
  .nav-toggle span[aria-hidden]::before { top: -5px; }
  .nav-toggle span[aria-hidden]::after { top: 5px; }
  .nav-toggle[aria-expanded="true"] span[aria-hidden] { background: transparent; }
  .nav-toggle[aria-expanded="true"] span[aria-hidden]::before { transform: translateY(5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span[aria-hidden]::after { transform: translateY(-5px) rotate(-45deg); }
  .nav ul {
    display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch;
    padding: .75rem 1.25rem 1.25rem; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav ul.open { display: flex; }
  .nav a { padding: .75rem .8rem; font-size: 1.05rem; }
  .nav a.nav-cta { margin: .5rem 0 0; text-align: center; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.3rem; border-radius: 12px; font-weight: 650; font-size: 1rem; text-decoration: none;
  border: 1px solid transparent; transition: transform .15s, background .15s, border-color .15s; cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
[data-theme="dark"] .btn-primary { color: #0b1210; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }
[data-theme="dark"] .btn-primary:hover { color: #0b1210; }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn-lg { padding: 1rem 1.6rem; font-size: 1.05rem; }

/* Hero */
.hero { padding: clamp(4rem, 10vw, 7.5rem) 0 3rem; }
.hero-inner { max-width: 880px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--accent); margin-bottom: 1rem; }
.hl { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--hl) 55%, transparent) 62%); padding: 0 .05em; }
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 720px; margin: 1.25rem 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: clamp(3rem, 7vw, 5rem) 0 0;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.stats > div { background: var(--surface); padding: 1.5rem 1.4rem; display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.stats dd { margin: 0 0 .35rem; font-size: clamp(1.9rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.stats dt { color: var(--muted); font-size: .92rem; line-height: 1.4; }
@media (max-width: 820px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .stats { grid-template-columns: 1fr; } }

/* Sections */
.section { padding: clamp(4rem, 9vw, 6.5rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-lede { color: var(--muted); font-size: 1.1rem; max-width: 680px; margin-bottom: 2.5rem; }
.two-col { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.two-col h2 { position: sticky; top: 100px; }
.prose p { color: var(--muted); }
.prose strong { color: var(--text); }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } .two-col h2 { position: static; } }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.card p { color: var(--muted); font-size: .98rem; margin: 0; }
.card-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 1.1rem; }
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Services */
.services { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 3rem; counter-reset: svc; }
.services li { padding: 1.6rem 0 1.4rem; border-top: 1px solid var(--line); counter-increment: svc; position: relative; padding-left: 3rem; }
.services li::before { content: counter(svc, decimal-leading-zero); position: absolute; left: 0; top: 1.75rem; font-size: .85rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.services p { color: var(--muted); margin: 0; }
@media (max-width: 720px) { .services { grid-template-columns: 1fr; } }

.toolbox { margin-top: 3rem; padding: 1.75rem; border-radius: var(--radius); background: var(--bg-alt); }
.toolbox h3 { font-size: .95rem; color: var(--muted); font-weight: 650; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; }
.chips li { padding: .35rem .8rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; font-weight: 550; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
@media (max-width: 960px) { .projects { grid-template-columns: 1fr; } }
.project {
  display: flex; flex-direction: column; padding: 1.6rem; border-radius: var(--radius); text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
}
.project:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--text); }
.project p { color: var(--muted); font-size: .98rem; flex: 1; }
.project-link { color: var(--accent); font-weight: 650; }

/* Contact */
.contact { text-align: center; }
.contact-inner { max-width: 760px; }
.contact .section-lede { margin-inline: auto; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.contact-note { margin-top: 1.75rem; color: var(--muted); font-size: .92rem; }
.email-reveal { margin-top: 1.25rem; display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.email-reveal[hidden], .email-error[hidden], .btn[hidden] { display: none; }
.email-hint { color: var(--muted); font-size: .95rem; margin: 0; }
.email-error { color: #b42318; font-size: .95rem; margin: 0; }
[data-theme="dark"] .email-error { color: #f97066; }
.btn:disabled { opacity: .6; cursor: default; transform: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; font-size: .92rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 4rem 0; }
.notfound .code { font-size: clamp(5rem, 18vw, 9rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--accent); margin: 0; }
