/* ============================================================================
   begi. portfolio — shared styles
   Built on the shadcn/studio design system (tokens.css) with a restrained
   warm-clay accent for personal-brand warmth.
   ============================================================================ */
@import url('tokens.css');

:root {
  /* personal accent — warm clay, harmonized with the system's warm shadow tint */
  --brand: oklch(0.62 0.16 41);
  --brand-soft: color-mix(in oklch, var(--brand) 12%, transparent);
  --brand-foreground: oklch(0.99 0 0);
  /* careem brand green (used only inside the Careem case study) */
  --careem: oklch(0.46 0.11 158);
  /* semantic tag families (Highlights = success/green, Community = info/blue) */
  --success: oklch(0.56 0.12 162);
  --success-soft: color-mix(in oklch, var(--success) 12%, transparent);
  --info: oklch(0.52 0.13 245);
  --info-soft: color-mix(in oklch, var(--info) 12%, transparent);
  --maxw: 1400px;
  --gutter: clamp(20px, 5vw, 72px);
}

html[data-density="compact"] { --gutter: clamp(16px, 4vw, 48px); }
html[data-density="compact"] .section { padding-top: clamp(40px,6vw,80px); padding-bottom: clamp(40px,6vw,80px); }
html[data-density="comfy"]   { --gutter: clamp(28px, 6vw, 104px); }
html[data-density="comfy"] .section { padding-top: clamp(72px,10vw,150px); padding-bottom: clamp(72px,10vw,150px); }

.dark { --success: oklch(0.72 0.13 162); --info: oklch(0.7 0.13 245); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font: var(--text-body);
  background: var(--background);
  color: var(--foreground);
  letter-spacing: var(--letter-spacing);
  overflow-x: hidden;
}
::selection { background: var(--brand); color: var(--brand-foreground); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---- layout container with the signature dashed vertical edges ---- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  border-left: 1px dashed var(--border);
  border-right: 1px dashed var(--border);
  position: relative;
}
.pad { padding-left: var(--gutter); padding-right: var(--gutter); }

/* small monospace eyebrow label */
.eyebrow {
  font: var(--text-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--brand);
  flex: none;
}
.eyebrow.plain::before { display: none; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0;
  z-index: var(--header-z-index);
  height: var(--header-height);
  background: color-mix(in oklch, var(--background) 70%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px dashed var(--border);
}
.site-header .inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.wordmark {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  display: inline-flex; align-items: baseline;
}
.wordmark .dot { color: var(--brand); }
.nav { display: flex; align-items: center; gap: 0.4rem; }
.nav-link {
  font: var(--text-mono);
  font-size: 0.8rem;
  color: var(--muted-foreground);
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-md);
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--foreground); background: var(--accent); }
@media (max-width: 720px){ .nav-link.hide-sm { display: none; } }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-sans); font-weight: 500; font-size: 0.9rem;
  padding: 0.6rem 1rem; border-radius: var(--radius-md);
  transition: background .15s, color .15s, border-color .15s, transform .15s;
  border: 1px solid transparent; white-space: nowrap;
}
.btn .ico { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: color-mix(in oklch, var(--primary) 90%, transparent); }
.btn-outline { border-color: var(--border); color: var(--foreground); background: var(--background); }
.btn-outline:hover { background: var(--accent); }
.btn-brand { background: var(--brand); color: var(--brand-foreground); }
.btn-brand:hover { background: color-mix(in oklch, var(--brand) 90%, black); }
.btn-ghost { color: var(--foreground); }
.btn-ghost:hover { background: var(--accent); }
.btn-lg { padding: 0.8rem 1.3rem; font-size: 1rem; }

/* icon button */
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center;
  border-radius: var(--radius-md); border: 1px solid var(--border);
  color: var(--foreground); background: var(--background);
  transition: background .15s;
}
.icon-btn:hover { background: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---- badge / chip ---- */
.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font: var(--text-xs); font-family: var(--font-mono);
  padding: 0.3rem 0.6rem; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted-foreground);
  background: var(--background);
}
.badge.metric { color: var(--brand); border-color: color-mix(in oklch, var(--brand) 35%, var(--border)); background: var(--brand-soft); }
.badge.solid { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }

/* ---- section rhythm ---- */
.section { padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(56px, 8vw, 112px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: clamp(32px, 5vw, 56px); flex-wrap: wrap; }
.rule { border: none; border-top: 1px dashed var(--border); }

/* type helpers (extend tokens) */
.display { font-family: var(--font-sans); font-weight: 700; letter-spacing: -0.03em; line-height: 1.02; }
.lead { font: var(--text-lead); color: var(--muted-foreground); }
.balance { text-wrap: balance; }
.pretty { text-wrap: pretty; }

/* ---- scroll reveal ----
   Content is fully visible by default (robust everywhere). The entrance is a
   one-shot keyframe applied via .in only when the document opts in by setting
   html[data-anim="on"] — kept off in environments that pin animations. */
.reveal { opacity: 1; }
html[data-anim="on"] .reveal { opacity: 0; }
html[data-anim="on"] .reveal.in { animation: revealUp .7s cubic-bezier(.22,.61,.36,1) both; }
@keyframes revealUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce){ html[data-anim="on"] .reveal { opacity: 1; } html[data-anim="on"] .reveal.in { animation: none; } html { scroll-behavior: auto; } }

/* ---- footer ---- */
.site-footer { border-top: 1px dashed var(--border); }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: 2.2rem; padding-bottom: 2.2rem; flex-wrap: wrap; }
.footer-grid .muted { color: var(--muted-foreground); font: var(--text-small); }

/* utility */
.muted { color: var(--muted-foreground); }
.mono { font-family: var(--font-mono); }
.flex { display: flex; }
.wrap { flex-wrap: wrap; }
.gap-sm { gap: 0.5rem; } .gap { gap: 1rem; } .gap-lg { gap: 1.5rem; }
.items-center { align-items: center; }
