/* Portfolio UI Kit — layout & component styles, built on ../../colors_and_type.css */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font-sans); background: var(--bg-page); color: var(--fg-1);
  -webkit-font-smoothing: antialiased; }
#root { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section--tint { background: var(--bg-surface); }
.section-head { text-align: center; margin-bottom: 48px; }
.section-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--brand-blue); }
.section-title { font-size: 34px; font-weight: 800; letter-spacing: -0.025em;
  color: var(--fg-strong); margin: 8px 0 0; }
.section-sub { font-size: 16px; color: var(--fg-3); margin: 10px 0 0; }

/* ---- Buttons ---- */
.btn { font-family: var(--font-sans); font-size: 15px; font-weight: 600; border: none;
  border-radius: var(--radius-md); padding: 12px 20px; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out); }
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--brand-blue); color: #fff; box-shadow: var(--shadow-brand); }
.btn--primary:hover { background: var(--brand-blue-hover); }
.btn--secondary { background: var(--brand-blue-weak); color: var(--brand-blue); }
.btn--secondary:hover { background: #D3F1E1; }
.btn--ghost { background: var(--bg-muted); color: var(--fg-1); }
.btn--ghost:hover { background: var(--grey-200); }
.btn--outline { background: #fff; color: var(--fg-1); border: 1.5px solid var(--border-strong); }
.btn--outline:hover { border-color: var(--grey-400); background: var(--grey-50); }
.btn--pill { border-radius: var(--radius-pill); }

/* ---- Tech chips ---- */
.tech { font-family: var(--font-mono); font-size: 12.5px; font-weight: 500;
  padding: 6px 12px 6px 10px; border-radius: var(--radius-sm); background: var(--bg-surface);
  border: 1px solid var(--border); color: var(--fg-1); box-shadow: var(--shadow-xs);
  display: inline-flex; align-items: center; gap: 7px; }
.tech::before { content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-green); flex: none; }

/* ---- Card ---- */
.card { background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-md);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }

/* ---- NavBar ---- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 64px;
  display: flex; align-items: center;
  background: rgba(255,255,255,0.72); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color var(--dur-base),
    box-shadow var(--dur-base); }
.nav--scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-xs); }
.nav .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800;
  letter-spacing: -0.03em; color: var(--fg-strong); }
.brand .mark { width: 34px; height: 34px; border-radius: var(--radius-md);
  background: var(--brand-blue); color: #fff; display: flex; align-items: center;
  justify-content: center; font-family: var(--font-mono); font-size: 15px; font-weight: 700;
  box-shadow: var(--shadow-brand); }
.brand .dev { color: var(--brand-blue); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link { font-size: 14px; font-weight: 600; color: var(--fg-2); padding: 8px 13px;
  border-radius: var(--radius-sm); cursor: pointer; transition: all var(--dur-fast) var(--ease-out); }
.nav-link:hover { color: var(--fg-strong); background: var(--bg-muted); }
.nav-cta { margin-left: 8px; }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ---- Modal ---- */
.modal-scrim { position: fixed; inset: 0; z-index: 100; background: rgba(23,31,40,0.45);
  backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center;
  padding: 24px; animation: fade var(--dur-base) var(--ease-out); }
.modal { background: #fff; border-radius: var(--radius-2xl); max-width: 820px; width: 100%;
  max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-xl);
  animation: rise var(--dur-slow) var(--ease-spring); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(0.98); } }

/* Entrance is a pure enhancement: animate TRANSFORM ONLY (never opacity), so a
   throttled/inactive tab that freezes the animation clock can never leave
   content stuck invisible. Worst case: a 16px offset. */
@keyframes floatUp { from { transform: translateY(16px); } to { transform: none; } }
.reveal { opacity: 1; animation: floatUp var(--dur-slow) var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; } }

/* ---- Projects pagination arrows ---- */
.proj-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-surface); color: var(--fg-1); cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md);
  transition: background var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out),
    transform var(--dur-fast) var(--ease-out); }
.proj-arrow:hover { background: var(--brand-green); color: #fff; border-color: var(--brand-green);
  box-shadow: var(--shadow-brand); }
.proj-arrow:active { transform: translateY(-50%) scale(0.92); }
.proj-arrow--prev { left: -24px; }
.proj-arrow--next { right: -24px; }
@media (max-width: 1140px) {
  .proj-arrow { width: 42px; height: 42px; }
  .proj-arrow--prev { left: -10px; }
  .proj-arrow--next { right: -10px; }
}
@media (max-width: 820px) {
  .proj-arrow--prev { left: -6px; }
  .proj-arrow--next { right: -6px; }
}
