/* alonlevi.me — clean, image-forward personal site. Self-hosted Inter, no third-party requests. */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg:       #ffffff;
  --bg-soft:  #f6f6f3;
  --card:     #ffffff;
  --ink:      #15171c;
  --ink-soft: #51555d;
  --muted:    #898d95;
  --line:     #e7e7e1;
  --accent:   #2848e6;
  --accent-h: #1c34b8;
  --code-bg:  #f0f1ee;
  --shadow:   0 1px 2px rgba(20,23,28,.04), 0 12px 32px -12px rgba(20,23,28,.14);
  --maxw:     64rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:       #0d0e11;
    --bg-soft:  #131419;
    --card:     #15161b;
    --ink:      #ededee;
    --ink-soft: #aeb2ba;
    --muted:    #777b83;
    --line:     #25272e;
    --accent:   #8aa0ff;
    --accent-h: #aebdff;
    --code-bg:  #1b1d23;
    --shadow:   0 1px 2px rgba(0,0,0,.3), 0 16px 40px -16px rgba(0,0,0,.6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-h); }

code, .nw { font-variant-ligatures: none; }
.nw { white-space: nowrap; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em; background: var(--code-bg); padding: 0.08em 0.36em; border-radius: 5px;
}
strong { font-weight: 620; }

/* ---------- section rhythm ---------- */
section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.band { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-title {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em;
  font-weight: 600; color: var(--muted); margin: 0 0 1.6rem;
}

/* ---------- hero ---------- */
.hero { padding-top: clamp(3.5rem, 8vw, 6.5rem); padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.hero-grid {
  display: grid; grid-template-columns: 1.5fr 0.9fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.eyebrow {
  font-size: 0.82rem; letter-spacing: 0.04em; font-weight: 600;
  color: var(--accent); margin: 0 0 1rem; text-transform: none;
}
h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1.02; letter-spacing: -0.035em;
  font-weight: 800; margin: 0 0 1.2rem;
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-soft); margin: 0 0 1.8rem; max-width: 34rem; }

.cta { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.btn {
  display: inline-flex; align-items: center; padding: 0.6rem 1.15rem;
  border: 1px solid var(--line); border-radius: 999px; font-size: 0.95rem; font-weight: 550;
  color: var(--ink); background: var(--card); transition: border-color .15s, transform .15s, background .15s;
}
.btn:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); border-color: var(--accent-h); color: #fff; }

.hero-photo img {
  width: 100%; max-width: 340px; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 28%;
  border-radius: 22px; box-shadow: var(--shadow); display: block; margin-left: auto;
  border: 1px solid var(--line);
}

/* ---------- about + portrait ---------- */
.about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.portrait { margin: 0; }
.portrait img {
  width: 100%; max-width: 360px; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 40%;
  border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); display: block;
}
.about-text p { margin: 0 0 1.1rem; }
.about-text p:last-child { margin-bottom: 0; }

.stack-line { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem !important; }
.stack-line span {
  font-size: 0.82rem; color: var(--ink-soft); background: var(--bg);
  border: 1px solid var(--line); border-radius: 7px; padding: 0.22rem 0.6rem;
}
@media (prefers-color-scheme: dark) { .stack-line span { background: #0d0e11; } }

/* ---------- work cards ---------- */
.group-label { font-size: 0.95rem; font-weight: 650; color: var(--ink); margin: 2rem 0 1rem; }
.group-label:first-of-type { margin-top: 0; }
.group-note { font-weight: 400; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.card {
  display: block; padding: 1.35rem 1.45rem; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; color: var(--ink);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
a.card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow); }
a.card:hover .arrow { color: var(--accent); transform: translate(2px,-2px); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.card-name { font-weight: 650; font-size: 1.05rem; letter-spacing: -0.01em; }
.arrow { color: var(--muted); font-size: 1.05rem; transition: color .15s, transform .15s; }
.card-tags { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.02em; margin: 0.3rem 0 0.7rem; }
.card-desc { font-size: 0.95rem; color: var(--ink-soft); margin: 0; line-height: 1.55; }

/* ---------- writing ---------- */
.writing { list-style: none; margin: 0; padding: 0; }
.writing li { border-top: 1px solid var(--line); }
.writing li:last-child { border-bottom: 1px solid var(--line); }
.writing a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 0.25rem; color: var(--ink); font-size: 1.02rem; font-weight: 480;
}
.writing a:hover { color: var(--accent); padding-left: 0.6rem; transition: padding .15s, color .15s; }
.writing .arrow { flex: none; }

/* ---------- contact ---------- */
.contact-wrap { text-align: left; }
.contact-lede { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--ink); margin: 0 0 1.4rem; max-width: 32rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; font-size: 1.02rem; }
.contact-links a { font-weight: 550; border-bottom: 1px solid transparent; }
.contact-links a:hover { border-bottom-color: currentColor; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 1.6rem 0; }
.footer-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--muted); }
.muted { color: var(--muted); }

/* ---------- a11y ---------- */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: 0.5rem 0.9rem; border-radius: 0 0 6px 0; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .hero-photo { order: -1; }
  .hero-photo img { margin: 0; max-width: 200px; border-radius: 18px; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .portrait img { max-width: 320px; }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .cta .btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto; }
}
