/* ============================================================
   Abdul Javed — personal site
   Dark, fast, zero-JS. Edit colors in :root to retheme.
   ============================================================ */

:root {
  --bg: #0b1016;
  --surface: #121923;
  --surface-2: #16202c;
  --border: #243245;
  --text: #e8eef4;
  --muted: #94a3b3;
  --accent: #2dd4bf;
  --accent-dim: rgba(45, 212, 191, 0.12);
  --amber: #fbbf24;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

::selection { background: var(--accent); color: #06241f; }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 5px;
  padding: 1px 5px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 16, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }

.site-nav .nav-cta {
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 7px 16px;
  border-radius: 8px;
  font-weight: 600;
}
.site-nav .nav-cta:hover { background: var(--accent-dim); }

/* CSS-only mobile menu */
.nav-toggle { display: none; }
.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  position: relative;
}
.nav-burger span,
.nav-burger span::before,
.nav-burger span::after {
  content: "";
  position: absolute;
  left: 10px;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.nav-burger span { top: 19px; }
.nav-burger span::before { top: -6px; left: 0; }
.nav-burger span::after { top: 6px; left: 0; }

@media (max-width: 780px) {
  .nav-burger { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
  }
  .site-nav a { padding: 10px 0; font-size: 16px; width: 100%; }
  .site-nav .nav-cta { text-align: center; margin-top: 8px; }
  .nav-toggle:checked ~ .site-nav { display: flex; }
}

/* ---------- hero ---------- */

.hero {
  padding: 96px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 350px);
  gap: 64px;
  align-items: center;
}

.portrait-wrap {
  position: relative;
  justify-self: end;
}

.portrait-wrap img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

/* offset teal frame behind the photo */
.portrait-wrap::before {
  content: "";
  position: absolute;
  inset: 18px -14px -14px 18px;
  border: 1px solid var(--accent);
  border-radius: 18px;
  opacity: 0.5;
  z-index: -1;
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .portrait-wrap { justify-self: start; max-width: 320px; }
}

.kicker {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}

.hero .lede {
  max-width: 680px;
  font-size: 19px;
  color: var(--muted);
  margin-bottom: 32px;
}
.hero .lede strong { color: var(--text); font-weight: 600; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 15.5px;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #06241f;
}
.btn-primary:hover { filter: brightness(1.1); }

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.cred-line {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.cred-line .sep { color: var(--accent); margin: 0 6px; }

/* ---------- stats strip ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 10px 0 26px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
}

.stat .num {
  display: block;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.stat .lbl {
  font-size: 13.5px;
  color: var(--muted);
}

@media (max-width: 780px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- sections ---------- */

section { padding: 72px 0 8px; scroll-margin-top: 80px; }

.section-head { margin-bottom: 36px; }

.section-head h2 {
  font-size: 1.9rem;
  letter-spacing: -0.02em;
  margin-top: 6px;
}

.section-head .sub {
  color: var(--muted);
  margin-top: 10px;
  max-width: 640px;
}

.prose p { margin-bottom: 18px; max-width: 760px; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); }
.prose { color: var(--muted); }

/* ---------- experience timeline ---------- */

.timeline {
  list-style: none;
  border-left: 1px solid var(--border);
  margin-left: 6px;
  padding-left: 30px;
  display: grid;
  gap: 40px;
}

.timeline li { position: relative; }

.timeline li::before {
  content: "";
  position: absolute;
  left: -35px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.role-head { margin-bottom: 10px; }

.role-head h3 { font-size: 1.2rem; letter-spacing: -0.01em; }

.role-head .org { color: var(--accent); font-weight: 600; }

.role-head .dates {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

.timeline ul {
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 15.5px;
}

.timeline ul li::before { content: none; }

.timeline ul li {
  padding-left: 18px;
  position: relative;
}

.timeline ul li::after {
  content: "›";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
}

/* ---------- cards ---------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

@media (max-width: 780px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover { border-color: var(--accent); transform: translateY(-2px); }

.card h3 { font-size: 1.15rem; letter-spacing: -0.01em; }

.card p { color: var(--muted); font-size: 15.5px; flex-grow: 1; }

.card .card-link { font-weight: 600; font-size: 15px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 6px;
  padding: 3px 9px;
}

/* ---------- certs ---------- */

.cert-card { gap: 6px; }
.cert-card:hover { transform: none; }

.cert-card .issuer {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cert-card h3 { font-size: 1.05rem; }

/* ---------- skills ---------- */

.skill-group { margin-bottom: 26px; }

.skill-group h3 {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 9px; }

.chip {
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 15px;
}

/* ---------- writing / posts ---------- */

.post-card .date {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

.post-list { display: grid; gap: 18px; }

/* ---------- contact ---------- */

.contact-card {
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 54px 40px;
  text-align: center;
}

.contact-card h2 { font-size: 1.9rem; letter-spacing: -0.02em; margin-bottom: 14px; }

.contact-card p { color: var(--muted); max-width: 560px; margin: 0 auto 30px; }

/* ---------- footer ---------- */

.site-footer {
  margin-top: 90px;
  border-top: 1px solid var(--border);
  padding: 30px 0 44px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.footer-row .mono { font-family: var(--mono); font-size: 12.5px; }

/* ---------- resume page ---------- */

.page-head { padding: 64px 0 8px; }

.page-head h1 { font-size: clamp(2rem, 5vw, 2.7rem); letter-spacing: -0.02em; margin: 6px 0 14px; }

.page-head .sub { color: var(--muted); max-width: 640px; }

.resume-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 26px 0 10px; }

.print-hint { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

.resume-doc { padding-bottom: 30px; }

.resume-doc section { padding: 44px 0 0; }

.resume-doc .section-head { margin-bottom: 22px; }

.resume-edu { display: grid; gap: 14px; }

.edu-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 20px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 14px;
}

.edu-row .deg { font-weight: 600; }
.edu-row .inst { color: var(--muted); font-style: italic; }

/* ---------- blog article ---------- */

.article { max-width: 720px; margin: 0 auto; padding: 64px 0 20px; }

.article .date { font-family: var(--mono); font-size: 13px; color: var(--muted); }

.article h1 { font-size: clamp(1.9rem, 5vw, 2.5rem); letter-spacing: -0.02em; line-height: 1.15; margin: 12px 0 10px; }

.article .byline { color: var(--muted); font-size: 15px; margin-bottom: 38px; }

.article h2 { font-size: 1.4rem; letter-spacing: -0.01em; margin: 38px 0 14px; }

.article p { color: #c2cdd8; margin-bottom: 18px; }

.article ul, .article ol { color: #c2cdd8; margin: 0 0 18px 24px; }
.article li { margin-bottom: 8px; }

.article .pull {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 26px 0;
  color: var(--text);
  font-weight: 500;
}

.back-link { font-family: var(--mono); font-size: 13.5px; }

.draft-banner {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid var(--amber);
  color: var(--amber);
  border-radius: 10px;
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 13.5px;
  margin-bottom: 30px;
}

/* ---------- print (resume page) ---------- */

@media print {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --border: #d0d7de;
    --text: #111111;
    --muted: #444444;
    --accent: #0d7a6e;
    --accent-dim: transparent;
    --amber: #7a5b0d;
  }
  body { font-size: 12px; }
  .site-header, .site-footer, .resume-actions, .nav-burger { display: none !important; }
  section, .resume-doc section { padding: 18px 0 0; }
  .page-head { padding: 0; }
  .card, .stat { break-inside: avoid; border-color: #d0d7de; }
  .timeline { gap: 16px; }
  a { color: #111; }
}
