/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text);
  font: 500 0.9375rem/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--hover-bg); border-color: var(--hover-border); }

/* The ONLY place --accent is used. Reserved for "Work with me" / "Book a consultation". */
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}
.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.875rem; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-h); /* reserved so the JS include causes no layout shift */
  padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.wordmark {
  flex: none;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-nav {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }

.site-nav ul {
  display: flex;
  width: max-content;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 10px 12px;
  color: var(--text-muted);
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 500; }

.site-header .btn { flex: none; } /* "Work with me" stays pinned and visible */

/* Hamburger toggle: mobile only */
.nav-toggle {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--hover-bg); }

.nav-toggle-bars,
.nav-toggle-bars::before {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.2s var(--ease);
}
.nav-toggle-bars { position: relative; transform: translateY(-3.5px); }
.nav-toggle-bars::before { content: ""; position: absolute; top: 7px; }
.is-open .nav-toggle-bars { transform: rotate(45deg); }
.is-open .nav-toggle-bars::before { transform: translateY(-7px) rotate(-90deg); }

/* Mobile and tablet menu: a gentle right-hand drawer rather than an instant dropdown. */
.nav-scrim { display: none; }
@media (max-width: 960px) {
  .site-header { position: relative; z-index: 50; }
  .wordmark { margin-right: auto; position:relative; z-index:2; }
  .site-header .header-cta { position:relative; z-index:2; }
  .nav-toggle { display: inline-flex; position:relative; z-index:2; }
  body.nav-lock { overflow: hidden; }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 0;
    background: rgba(17, 17, 17, .22);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 0;
    transition: opacity 320ms ease, visibility 0s linear 320ms;
  }
  .site-header.is-open .nav-scrim {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }

  .site-nav {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 0 auto;
    left: auto;
    width: min(88vw, 370px);
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: clamp(22px, 5vw, 38px) 28px 40px;
    background: var(--bg);
    border-left: 1px solid var(--border);
    box-shadow: -12px 0 40px rgba(0,0,0,.035);
    z-index: 1;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(102%, 0, 0);
    transition: transform 480ms var(--ease), opacity 260ms ease, visibility 0s linear 480ms;
    will-change: transform;
  }
  .site-header.is-open .site-nav {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0,0,0);
    transition-delay: 0s;
  }
  .site-nav ul { display: flex; flex-direction: column; gap: 0; width: 100%; margin: 0; }
  .site-nav li {
    border-bottom: 1px solid var(--border);
    opacity: 0;
    transform: translate3d(20px, 0, 0);
    transition: opacity 260ms ease, transform 410ms var(--ease);
    transition-delay: 0ms;
  }
  .site-header.is-open .site-nav li { opacity: 1; transform: translate3d(0,0,0); }
  .site-header.is-open .site-nav li:nth-child(1) { transition-delay: 85ms; }
  .site-header.is-open .site-nav li:nth-child(2) { transition-delay: 135ms; }
  .site-header.is-open .site-nav li:nth-child(3) { transition-delay: 185ms; }
  .site-header.is-open .site-nav li:nth-child(4) { transition-delay: 235ms; }
  .site-header.is-open .site-nav li:nth-child(5) { transition-delay: 285ms; }
  .site-nav a {
    display: block;
    padding: 19px 0 20px;
    color: var(--text);
    font-weight: 500;
    font-size: clamp(1.15rem, 4vw, 1.4rem);
    letter-spacing: -.035em;
    border: 0;
    transition: color 180ms ease;
  }
  .site-nav a[aria-current="page"] { color: var(--accent); }
  .site-nav li:last-child { border-bottom: 0; }
  .site-nav a:hover { color: var(--accent); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-scrim, .site-nav, .site-nav li { transition: none !important; transform: none !important; }
  .site-nav { will-change: auto; }
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding: 16px max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

@media (max-width: 639px) {
  .site-footer { flex-direction: column; text-align: center; gap: 2px; }
  .site-footer ul { justify-content: center; }
}

/* ---------- Homepage (single screen, no scroll) ---------- */
.page-home {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.home {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px var(--gutter);
  text-align: center;
}

.home .avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 4px;
}

.home h1 { font-size: clamp(1.75rem, 7vw, 3rem); }

.home .descriptor {
  max-width: 34rem;
  color: var(--text-secondary);
  font-size: clamp(1rem, 3.5vw, 1.125rem);
}

.home .local-time {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.home-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  max-width: 24rem;
  margin-top: 16px;
}
/* Mobile: "Work with me" full-width on top, the other two side by side below */
.home-actions .btn-accent { grid-column: 1 / -1; order: -1; }

@media (min-width: 640px) {
  .home-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: none;
    margin-top: 20px;
  }
  .home-actions .btn-accent { order: 0; }
}

/* Very short windows: allow scrolling rather than clipping content */
@media (max-height: 520px) {
  .page-home { height: auto; min-height: 100dvh; overflow: auto; }
}
