/* ============================================================
   Musa Ali — personal site
   Palette: warm, muted, paper-toned. No gradients, no blur,
   no glow. Colors below are the only ones used in this file.
   ============================================================ */

:root {
  --dark-khaki: #2f3b2f;   /* primary text — deep sage-black */
  --stone-brown: #5c6b58;  /* secondary / muted text — muted sage-gray */
  --sand: #6f9760;         /* links, accents, hover fills — sage green */
  --dry-sage: #cfe0c4;     /* borders, dividers, quiet backgrounds — light sage */
  --frosted-mint: #ffffff; /* page background — white */

  --paper: #f6f9f2;        /* faint sage-tinted card surface */
  --ink-soft: rgba(47, 59, 47, 0.65);
  --hairline: rgba(47, 59, 47, 0.14);

  --font-display: "Lora", Georgia, serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  --measure: 640px;
  --page-max: 900px;
  --nav-height: 73px; /* actual rendered height of .site-nav, used to offset fixed positioning */
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--frosted-mint);
  color: var(--dark-khaki);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* push content down so it doesn't start underneath the fixed nav */
  padding-top: var(--nav-height);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
h1, h2, h3, p { margin: 0; }

.container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Skip link (keyboard accessibility) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--dark-khaki);
  color: var(--frosted-mint);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------- Nav ---------- */
.site-nav {
  border-bottom: 1px solid var(--hairline);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
  background: var(--frosted-mint);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
  gap: 24px;
  flex-wrap: wrap;
}
.site-nav .name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.nav-links {
  display: flex;
  gap: 22px;
}
.nav-links a {
  text-decoration: none;
  font-size: 15px;
  color: var(--stone-brown);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.is-active {
  color: var(--dark-khaki);
  border-bottom-color: var(--sand);
}
.nav-actions {
  display: flex;
  gap: 10px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  text-decoration: none;
  padding: 9px 16px;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--dark-khaki);
  color: var(--frosted-mint);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--stone-brown);
}
.btn-secondary {
  background: transparent;
  color: var(--dark-khaki);
  border-color: var(--stone-brown);
}
.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--dry-sage);
  border-color: var(--dry-sage);
}

/* ---------- Section rhythm ---------- */
section {
  padding: 76px 0;
}
section + section {
  border-top: 1px solid var(--hairline);
}
h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 32px);
  font-weight: 600;
  margin-bottom: 28px;
  max-width: var(--measure);
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 72px;
  padding-bottom: 64px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1.18;
  max-width: 760px;
  letter-spacing: -0.005em;
}
.hero .intro {
  margin-top: 22px;
  max-width: var(--measure);
  font-size: 18px;
  line-height: 1.75;
  color: var(--stone-brown);
}
.hero .intro a {
  color: var(--dark-khaki);
  text-decoration: underline;
  text-decoration-color: var(--sand);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.hero .intro a:hover,
.hero .intro a:focus-visible {
  color: var(--sand);
}
.hero .meta {
  margin-top: 26px;
  font-size: 15px;
  color: var(--stone-brown);
}
.hero .meta span:not(:last-child)::after {
  content: "·";
  margin: 0 10px;
  color: var(--dry-sage);
}
.hero .hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- About ---------- */
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 56px;
  align-items: start;
  grid-auto-rows: auto;
}
.about-layout > div:first-child,
.about-layout > dl {
  align-self: start;
}
.about-layout p {
  color: var(--stone-brown);
  margin-bottom: 18px;
  max-width: var(--measure);
}
.about-layout p:last-child { margin-bottom: 0; }
.about-layout strong { color: var(--dark-khaki); font-weight: 600; }

.pull-note {
  border-left: 2px solid var(--sand);
  padding-left: 18px;
  margin: 26px 0;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.5;
  color: var(--dark-khaki);
  max-width: 480px;
}

.facts {
  border: 1px solid var(--hairline);
  background: var(--paper);
  padding: 22px 24px;
}
.facts dt {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--stone-brown);
}
.facts dd {
  margin: 2px 0 16px 0;
  font-size: 16px;
  color: var(--dark-khaki);
}
.facts div:last-child dd { margin-bottom: 0; }

/* ---------- Experience (timeline + accordion) ---------- */
.timeline {
  position: relative;
  max-width: 760px;
}
.timeline-item {
  position: relative;
  padding-left: 30px;
  border-bottom: 1px solid var(--hairline);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 28px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--frosted-mint);
  border: 2px solid var(--sand);
}
.timeline-item::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 40px;
  bottom: 0;
  width: 1px;
  background: var(--dry-sage);
}
.timeline-item:last-child::after { display: none; }

.entry-toggle {
  width: 100%;
  text-align: left;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.entry-heading {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--dark-khaki);
}
.entry-org {
  font-size: 14.5px;
  color: var(--stone-brown);
  margin-top: 3px;
}
.entry-when {
  font-size: 14px;
  color: var(--stone-brown);
  white-space: nowrap;
}
.entry-plus {
  display: inline-block;
  width: 18px;
  text-align: center;
  color: var(--sand);
  font-size: 18px;
  transition: transform 0.2s ease;
}
.entry-toggle[aria-expanded="true"] .entry-plus {
  transform: rotate(45deg);
}
.entry-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
.entry-body-inner {
  overflow: hidden;
}
.entry-toggle[aria-expanded="true"] + .entry-body {
  grid-template-rows: 1fr;
}
.entry-body ul {
  padding-bottom: 24px;
}
.entry-body li {
  color: var(--stone-brown);
  font-size: 15.5px;
  line-height: 1.7;
  padding-left: 18px;
  position: relative;
  margin-bottom: 10px;
}
.entry-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 1px;
  background: var(--stone-brown);
}
.entry-body li:last-child { margin-bottom: 0; }

/* ---------- Approach (plain stacked list, not a card grid) ---------- */
.approach-list {
  max-width: var(--measure);
}
.approach-item {
  display: flex;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--hairline);
}
.approach-item:last-child {
  border-bottom: 1px solid var(--hairline);
}
.approach-mark {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--sand);
  font-size: 20px;
  line-height: 1.6;
}
.approach-item h3 {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--dark-khaki);
  margin-bottom: 6px;
}
.approach-item p {
  color: var(--stone-brown);
  font-size: 15.5px;
  line-height: 1.7;
}

/* ---------- Contact / footer ---------- */
.contact {
  padding-bottom: 90px;
}
.contact-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  flex-wrap: wrap;
}
.contact p {
  color: var(--stone-brown);
  max-width: 420px;
  margin-top: -10px;
  margin-bottom: 28px;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.contact-links a {
  text-decoration: none;
  font-size: 15.5px;
  color: var(--dark-khaki);
  border-bottom: 1px solid var(--dry-sage);
  padding-bottom: 1px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.contact-links a:hover,
.contact-links a:focus-visible {
  color: var(--sand);
  border-bottom-color: var(--sand);
}

footer.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 26px 0;
}
footer.site-footer .container {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--stone-brown);
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Focus visibility ---------- */
:focus-visible {
  outline: 2px solid var(--sand);
  outline-offset: 2px;
}

/* ---------- Anchor scroll offset (accounts for fixed nav) ---------- */
section[id] {
  scroll-margin-top: var(--nav-height);
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  section { padding: 56px 0; }
  .about-layout {
    grid-template-columns: 1fr;
  }
  .nav-right {
    gap: 16px;
  }
  .nav-links {
    display: none;
  }
  .contact-flex {
    align-items: flex-start;
  }
  .entry-toggle {
    flex-direction: column;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.001ms !important; }
}

/* ---------- Resume viewer page (resume/index.html) ---------- */
.resume-page-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--hairline);
  font-size: 14.5px;
}
.resume-page-bar a {
  text-decoration: none;
}
.resume-page-bar .back-link {
  color: var(--stone-brown);
}
.resume-page-bar .back-link:hover,
.resume-page-bar .back-link:focus-visible {
  color: var(--dark-khaki);
}
.resume-page-bar .download-link {
  color: var(--dark-khaki);
  border-bottom: 1px solid var(--sand);
}
.resume-embed {
  width: 100%;
  height: 100vh;
  border: none;
  display: block;
}

/* Remove default body margin/padding so no background shows around the iframe.
   Note: the resume viewer page doesn't use .site-nav, so the body padding-top
   above (for the fixed nav) is overridden back to 0 here. */
body:has(.resume-embed) {
  margin: 0;
  padding: 0;
  overflow: hidden;
}