/* Muhammad Saleem Awan — portfolio styles.
   Colours live in :root; change them there to re-theme the whole site. */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600.woff2") format("woff2"); }

:root {
  --navy: #0f2a44;
  --navy-2: #1b3d5f;
  --accent: #0f766e;
  --accent-soft: #e6f3f1;
  --text: #1f2937;
  --muted: #5b6573;
  --line: #e3e7ec;
  --bg: #ffffff;
  --tint: #f5f7fa;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 42, 68, .06), 0 8px 24px rgba(15, 42, 68, .06);
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font: 400 1rem/1.65 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--accent); }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); font-weight: 400; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .75em 1.35em; border-radius: 999px;
  background: var(--navy); color: #fff; text-decoration: none; font-weight: 500;
  border: 1.5px solid var(--navy);
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--navy-2); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-sm { padding: .45em 1em; font-size: .92rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { white-space: nowrap; display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--navy); font-weight: 600; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--navy); color: #fff; font-size: .85rem; letter-spacing: .03em;
}
.menu { display: flex; align-items: center; gap: 1.6rem; }
.menu a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; }
.menu a:not(.btn):hover { color: var(--accent); }
.menu-btn { display: none; }

@media (max-width: 1080px) {
  .menu-btn {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px;
    background: #fff; cursor: pointer;
  }
  .menu-btn span { display: block; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .menu {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 8px 16px 16px; display: none;
  }
  .menu.open { display: flex; }
  .menu a:not(.btn) { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .menu .btn { margin-top: 12px; }
}
@media (max-width: 420px) { .brand-name { font-size: .95rem; } }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 3.5rem); background: linear-gradient(180deg, var(--tint), #fff 70%); }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .8rem; }
.post { color: var(--accent); }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 38em; }
.cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0 1.4rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.tags li { font-size: .85rem; padding: .3em .8em; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.hero-photo { justify-self: center; width: min(360px, 100%); }
.hero-photo img {
  border-radius: 22px; box-shadow: var(--shadow);
  border: 6px solid #fff; outline: 1px solid var(--line);
  aspect-ratio: 4 / 5; object-fit: cover;
}

.stats {
  list-style: none; padding: 0; margin: clamp(2rem, 5vw, 3rem) 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.stats li { padding: 1.3rem 1.4rem; border-left: 1px solid var(--line); }
.stats li:first-child { border-left: 0; }
.stats strong { display: block; font-size: 1.75rem; font-weight: 600; color: var(--navy); line-height: 1.1; margin-bottom: .3rem; }
.stats span { font-size: .9rem; color: var(--muted); line-height: 1.4; display: block; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; width: min(240px, 70%); justify-self: start; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li:nth-child(3) { border-left: 0; }
  .stats li:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.section-tint { background: var(--tint); }
.kicker { color: var(--accent); font-weight: 600; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .4rem; }
.section h2 { margin-bottom: 1.6rem; }

.two-col { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(1.5rem, 5vw, 4rem); }
.prose p { color: var(--text); }
.facts { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem 1.5rem; }
.facts li { border-top: 1px solid var(--line); padding-top: .7rem; font-weight: 500; color: var(--navy); }
.facts span { display: block; font-size: .8rem; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
  .two-col h2 { margin-bottom: 0; }
}
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 1.2rem; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cards-3 { grid-template-columns: 1fr; } }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(15, 42, 68, .06), 0 14px 32px rgba(15, 42, 68, .1); }
.card p:last-child { margin-bottom: 0; color: var(--muted); }
.card-accent { background: var(--navy); border-color: var(--navy); }
.card-accent h3 { color: #fff; }
.card-accent .chips li { background: rgba(255, 255, 255, .12); color: #fff; }
.big { font-size: 1.9rem; font-weight: 600; color: var(--accent); line-height: 1.1; margin-bottom: .5rem; }

.chips { list-style: none; padding: 0; margin: .4rem 0 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.chips li { font-size: .85rem; padding: .3em .75em; border-radius: 8px; background: var(--tint); color: var(--navy); border: 1px solid var(--line); }
.section-tint .chips li { background: #fff; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.job { position: relative; padding: 0 0 2rem 2.2rem; }
.job:last-child { padding-bottom: 0; }
.job::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent);
}
.job:first-child::before { background: var(--accent); }
.job-head { margin-bottom: .6rem; }
.job-head h3 { margin-bottom: .2rem; }
.job-meta { margin: 0; color: var(--text); }
.job-date { margin: .1rem 0 0; font-size: .9rem; color: var(--muted); }
.job ul { margin: 0; padding-left: 1.1rem; color: var(--text); }
.job ul li { margin-bottom: .35rem; }
.job ul li::marker { color: var(--accent); }
.job > * { max-width: 60rem; }

/* ---------- Contact ---------- */
.contact { background: var(--navy); color: #fff; }
.contact h2, .contact .kicker { color: #fff; }
.contact .kicker { opacity: .75; }
.contact-box { text-align: center; }
.contact-sub { color: rgba(255, 255, 255, .8); max-width: 36em; margin: 0 auto 2rem; }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; text-align: left; }
.contact-item {
  display: block; padding: 1.1rem 1.3rem; border-radius: var(--radius);
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16);
  color: #fff; text-decoration: none; font-weight: 500; overflow-wrap: anywhere;
  transition: background .2s;
}
.contact-item:hover { background: rgba(255, 255, 255, .14); }
.contact-item span { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .65); margin-bottom: .2rem; }
.cta-center { justify-content: center; margin-bottom: 0; margin-top: 2rem; }
.contact .btn { background: #fff; color: var(--navy); border-color: #fff; }
.contact .btn:hover { background: var(--accent-soft); }
.contact .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.contact .btn-ghost:hover { background: #fff; color: var(--navy); }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: #0b2033; color: rgba(255, 255, 255, .7); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: 1.3rem 0; }
.site-footer p { margin: 0; }
.site-footer a { color: rgba(255, 255, 255, .85); text-decoration: none; }

/* ---------- Gentle reveal on scroll (only when JS is on) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .cta, .site-footer { display: none; }
  .contact { background: #fff; color: #000; }
}
.card p.edu { color: var(--text); }
.card p.edu strong { color: var(--navy); }

/* ---------- Recommendations ---------- */
.section-sub { color: var(--muted); max-width: 44em; margin: -1rem 0 2rem; }
.recs { columns: 2 340px; column-gap: 1.2rem; }
.rec {
  break-inside: avoid; margin: 0 0 1.2rem; padding: 1.5rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  border-top: 3px solid var(--accent);
}
.rec blockquote { margin: 0 0 1.2rem; color: var(--text); font-size: .98rem; }
.rec figcaption { display: flex; gap: .8rem; align-items: flex-start; font-size: .9rem; line-height: 1.45; }
.rec figcaption strong { color: var(--navy); }
.rec-avatar {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .85rem;
}
.rec-title { color: var(--muted); }
.rec-rel { color: var(--accent); font-size: .82rem; font-weight: 500; }
.more-link { margin: .4rem 0 0; font-weight: 500; }
.more-link a, .cred-more a, .cred-list a { text-decoration: none; }
.more-link a:hover, .cred-more a:hover, .cred-list a:hover { text-decoration: underline; }

/* ---------- Credentials list ---------- */
.card p.edu { margin-bottom: .9rem; }
.card p.edu:last-child { margin-bottom: 0; }
.cred-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.cred-list li { padding: .7rem 0; border-top: 1px solid var(--line); font-size: .92rem; }
.cred-list li:first-child { border-top: 0; padding-top: 0; }
.cred-list strong { display: block; color: var(--navy); font-weight: 500; }
.cred-list span { display: block; color: var(--muted); font-size: .85rem; }
.cred-list a { font-size: .85rem; font-weight: 500; }
.card p.cred-more { font-size: .88rem; font-weight: 500; }
.contact-sub a { color: #fff; }
