/* ─────────────────────────────────────────────────────────────
   Ahmed Rafe Tariq — personal site
   Minimal, light, narrow-column. Inspired by hivam.org / leonardtang.me
   ───────────────────────────────────────────────────────────── */

:root {
  --bg: #fbfbfa;
  --fg: #1a1a1a;
  --muted: #6b6b6b;
  --faint: #9a9a9a;
  --rule: #e6e6e3;
  --link: #1a1a1a;
  --accent: #1d4ed8;
  --max: 680px;
  --serif: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, "Inter", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.15s ease, color 0.15s ease;
}
a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Top nav ──────────────────────────────────────────────── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem max(1.25rem, calc((100% - var(--max)) / 2));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  font-size: 0.85rem;
}
.topnav__name {
  font-weight: 600;
  border: none;
}
.topnav__name:hover {
  color: var(--fg);
}
.topnav__links {
  display: flex;
  gap: 1.1rem;
  color: var(--muted);
}
.topnav__links a {
  color: var(--muted);
  border: none;
  text-transform: lowercase;
}
.topnav__links a:hover {
  color: var(--fg);
}

/* ── Layout ───────────────────────────────────────────────── */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: 4.5rem 0 2.5rem;
}
.hero h1 {
  font-size: 2.45rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  font-weight: 650;
}
.hero__tagline {
  font-size: 1.15rem;
  color: var(--fg);
  margin: 0 0 1.25rem;
}
.hero__bio,
.hero__now {
  color: var(--muted);
  margin: 0 0 1.75rem;
  max-width: 62ch;
}
.hero__bio a,
.hero__now a {
  color: var(--fg);
}
.hero__links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}
.hero__links a {
  border: none;
  color: var(--fg);
  position: relative;
}
.hero__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}
.hero__links a:hover {
  color: var(--accent);
}
.hero__links a:hover::after {
  background: var(--accent);
  transform: scaleX(1);
}

/* ── Sections ─────────────────────────────────────────────── */
.section {
  padding: 2.25rem 0;
  border-top: 1px solid var(--rule);
}
.section h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
  font-weight: 600;
  margin: 0 0 1.1rem;
}
.section p {
  margin: 0 0 1rem;
}
.section__lead {
  color: var(--muted);
}

/* ── Publications ─────────────────────────────────────────── */
.pubs {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: pub;
}
.pub {
  display: block;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}
.pub:last-child {
  border-bottom: none;
}
.pub__title {
  display: block;
  font-weight: 550;
  line-height: 1.4;
}
a.pub__title {
  border: none;
}
a.pub__title:hover {
  color: var(--accent);
}
.pub__meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ── Projects ─────────────────────────────────────────────── */
.projects {
  list-style: none;
  margin: 0;
  padding: 0;
}
.project {
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--rule);
}
.project:last-child {
  border-bottom: none;
}
.project__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.project__name {
  font-weight: 600;
  border: none;
}
.project__desc {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.badge {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--muted);
}
.badge--live {
  color: #15803d;
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.badge--building {
  color: #b45309;
  border-color: #fde68a;
  background: #fffbeb;
}

/* ── Experience / Education ───────────────────────────────── */
.subhead {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--fg);
  margin: 1.4rem 0 0.4rem;
}
.subhead:first-of-type {
  margin-top: 0;
}
.exp {
  list-style: none;
  margin: 0;
  padding: 0;
}
.exp__item {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}
.exp__item:last-child {
  border-bottom: none;
}
.exp__role {
  font-weight: 600;
}
.exp__org {
  color: var(--muted);
}
.exp__role + .exp__org::before {
  content: " — ";
  color: var(--faint);
}
.exp__desc {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* placeholder marker — visible to you, easy to grep + remove */
.todo {
  color: var(--accent);
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  max-width: var(--max);
  margin: 1.5rem auto 3rem;
  padding: 1.25rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--faint);
}
.footer a {
  color: var(--faint);
  border: none;
}
.footer a:hover {
  color: var(--fg);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .topnav__links {
    display: none;
  }
  .hero {
    padding: 3rem 0 2rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
}
