/* ============================================================
   Simba World — dark, modern theme
   ============================================================ */

:root {
  --bg: #0b0f14;
  --bg-soft: #0f141b;
  --surface: #121922;
  --surface-2: #161f2b;
  --border: #232f3d;
  --border-soft: #1b2430;
  --text: #e8eef5;
  --text-muted: #9aa7b8;
  --text-faint: #6b7888;
  --accent: #f0b429;      /* Simba gold */
  --accent-soft: #f0b42922;
  --accent-text: #f7c84b;
  --link: #7fb6ff;
  --mono: "SF Mono", "JetBrains Mono", "Fira Code", ui-monospace, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 20, 0.8);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--text);
}
.brand span { color: var(--accent); }

.nav-links { display: flex; gap: 22px; }
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 72px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 720px;
  background: radial-gradient(circle, rgba(240, 180, 41, 0.16), transparent 65%);
  pointer-events: none;
}

.hero .eyebrow {
  font-family: var(--mono);
  color: var(--accent-text);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
.hero h1 .dim { color: var(--text-muted); }

.hero .tagline {
  font-size: 1.18rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 0 24px;
}

.hero .meta { color: var(--text-faint); font-size: 0.95rem; margin-bottom: 28px; }
.hero .meta b { color: var(--text-muted); font-weight: 600; }

.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #1a1300; font-weight: 600; }
.btn.primary:hover { background: var(--accent-text); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-soft); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }

.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 8px; }
.section-head .num {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}
.section-head h2 {
  font-size: 1.7rem;
  margin: 0;
  letter-spacing: -0.01em;
}
.section-sub { color: var(--text-muted); margin: 0 0 36px; max-width: 640px; }

/* ---------- About ---------- */
.about p { max-width: 680px; color: var(--text-muted); }
.about .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 26px; }
.fact {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.fact .label { font-family: var(--mono); font-size: 0.78rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.fact .value { margin-top: 4px; font-weight: 600; }

/* ---------- Experience (timeline) ---------- */
.timeline { position: relative; padding-left: 28px; border-left: 2px solid var(--border); }
.timeline-item { position: relative; padding-bottom: 40px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
}
.timeline-item .when {
  font-family: var(--mono);
  color: var(--text-faint);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.timeline-item h3 { margin: 4px 0 2px; font-size: 1.15rem; }
.timeline-item .org { color: var(--accent-text); font-weight: 600; font-size: 0.95rem; }
.timeline-item ul { margin: 12px 0 0; padding-left: 18px; color: var(--text-muted); }
.timeline-item li { margin-bottom: 7px; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--border); transform: translateY(-2px); }
.card h3 { margin: 0 0 6px; font-size: 1.08rem; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--accent-text); text-decoration: none; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.card .tag { font-family: var(--mono); font-size: 0.75rem; color: var(--accent-text); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }

/* ---------- Contributions list ---------- */
.contrib-list { display: flex; flex-direction: column; gap: 14px; }
.contrib {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.contrib .icon {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-text);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.9rem;
}
.contrib h3 { margin: 0 0 2px; font-size: 1.02rem; }
.contrib h3 a { color: var(--text); }
.contrib h3 a:hover { color: var(--accent-text); text-decoration: none; }
.contrib .role { font-family: var(--mono); font-size: 0.75rem; color: var(--accent-text); text-transform: uppercase; letter-spacing: 0.05em; }
.contrib p { margin: 6px 0 0; color: var(--text-muted); font-size: 0.93rem; }

/* ---------- Skills ---------- */
.skill-group { margin-bottom: 24px; }
.skill-group h3 { font-family: var(--mono); font-size: 0.82rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-size: 0.88rem;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

/* ---------- Awards ---------- */
.awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.award {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.award .title { font-weight: 600; }
.award .where { color: var(--text-muted); font-size: 0.88rem; }

/* ---------- Contact ---------- */
.contact { text-align: center; padding: 72px 0 88px; }
.contact h2 { font-size: 1.9rem; margin: 0 0 12px; }
.contact p { color: var(--text-muted); max-width: 520px; margin: 0 auto 28px; }
.contact .actions { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border-soft); padding: 28px 0; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }
.footer .muted { color: var(--text-faint); }
.footer-copy { display: flex; flex-direction: column; gap: 2px; }
.footer-meta { display: flex; align-items: center; }
.counter-badge { display: block; height: 22px; }
.ad { display: flex; justify-content: center; margin-top: 24px; min-height: 60px; }

/* ---------- Markdown page content (e.g. PostCardly) ---------- */
.content-wrap { padding: 48px 0 80px; }
.prose { max-width: 760px; }
.prose h1 { font-size: 2rem; margin-top: 8px; }
.prose h2 { font-size: 1.3rem; margin-top: 28px; }
.prose p, .prose li { color: var(--text-muted); }
.prose a { color: var(--link); }
.back-link { display: inline-block; margin-bottom: 24px; font-size: 0.9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .nav { height: auto; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 24px; }
  .nav-links { gap: 14px; flex-wrap: wrap; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 48px 0; }
  .footer { flex-direction: column; align-items: flex-start; }
  .contrib { flex-direction: column; }
}
