/* Design system: see design/README.md and .claude/skills/personal-site-design */
:root {
  --bg: #ECEBE8;
  --surface: #F6F5F3;
  --border: #CDCCC8;
  --muted: #5E5E61;
  --body: #46464A;
  --ink: #232325;
  --ink-hover: #38383B;
  --on-ink: #ECEBE8;
  --on-ink-muted: #B5B5B8;
  --coral: #FF7867;
  --coral-strong: #E8553F;

  --r-photo: 6px;
  --r-tile: 10px;
  --r-card: 14px;
  --r-pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: Archivo, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--coral-strong); }
a:focus-visible { outline: 2px solid var(--coral-strong); outline-offset: 2px; }

p { margin: 0; }
h1 { margin: 0; font-weight: inherit; }

/* ---------- Mobile (< 900px): single column, exactly one screen tall, no scroll ---------- */
.page {
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding:
    calc(12px + env(safe-area-inset-top))
    calc(20px + env(safe-area-inset-right))
    calc(20px + env(safe-area-inset-bottom))
    calc(20px + env(safe-area-inset-left));
}

.nav { display: flex; align-items: center; }

.nav-links {
  margin-left: auto;
  display: flex;
  gap: 20px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}
.nav-links a { color: var(--muted); }
.nav-links a:hover,
.nav-links a[aria-current="page"],
.nav-links a.is-active { color: var(--ink); }

.logo {
  font-weight: 800;
  font-size: 14px;
  font-stretch: 125%;
  letter-spacing: 0.04em;
  line-height: 1;
}
.logo:hover { color: var(--ink); }

/* Mobile stacks everything in one flex column; the wrappers dissolve. */
.hero, .col-media, .col-text { display: contents; }

/* Mobile: same 4:5 crop as desktop, as tall as the leftover space allows, never wider than the column. */
.photo {
  flex: 1 1 0;
  min-height: 0;
  max-height: calc((100vw - 40px) * 1.25);
  position: relative;
}

.photo img {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  width: auto;
  aspect-ratio: 4 / 5;
  transform: translateX(-50%);
  object-fit: cover;
  object-position: center;
  border-radius: var(--r-photo);
  background: var(--surface);
  display: block;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 18px;
  color: var(--muted);
}

.socials a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-tile);
  transition: border-color 150ms ease, color 150ms ease;
}
.socials a:hover { border-color: var(--coral-strong); color: var(--coral-strong); }

.name {
  font-weight: 900;
  font-size: 38px;
  font-stretch: 125%;
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 500;
  font-size: 12px;
}

.pill {
  background: var(--ink);
  color: var(--coral);
  padding: 5px 10px;
  border-radius: var(--r-pill);
}

.location { color: var(--muted); }

.bio {
  font-size: 15px;
  line-height: 1.5;
  color: var(--body);
  text-wrap: pretty;
}


/* ---------- Desktop (≥ 900px) ---------- */
@media (min-width: 900px) {
  .page {
    height: auto;
    min-height: 100vh;
    gap: 40px;
    padding: 36px 56px 64px;
  }

  .logo { font-size: 18px; }
  .nav-links { font-size: 14px; }

  .hero {
    flex: 1;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 64px;
    align-items: end;
    width: 100%;
    max-width: 1200px;
  }

  .col-media { display: flex; flex-direction: column; gap: 12px; }

  .photo { flex: none; height: 400px; max-height: none; position: static; }
  .photo img {
    position: static;
    width: 100%;
    transform: none;
  }

  .socials {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    font-size: 19px;
  }
  .socials a { width: auto; height: 50px; }

  .col-text {
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 28px;
  }

  /* Desktop order: meta, name, bio */
  .meta { order: -1; gap: 12px; font-size: 13px; }
  .pill { padding: 6px 12px; }

  .name {
    font-size: clamp(38px, 7.5vw, 96px);
    /* Size to the text column so "LEVCOVICH" never overflows. */
    font-size: clamp(38px, 12.5cqi, 96px);
    line-height: 0.86;
    letter-spacing: -0.03em;
  }

  .bio { font-size: 19px; line-height: 1.55; max-width: 540px; }
}

/* ---------- Load-in: fade up, 400ms, 40ms stagger ---------- */
@media (prefers-reduced-motion: no-preference) {
  .fade { animation: fade-up 400ms ease both; }
  .socials { animation-delay: 40ms; }
  .name { animation-delay: 80ms; }
  .meta { animation-delay: 120ms; }
  .bio { animation-delay: 160ms; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
