/* amnahsiddiqa.com: minimal single-page site. No external fonts or scripts. */

:root {
  --bg: #fbfaf7;
  --text: #1c1c1a;
  --muted: #5f5e59;
  --rule: #e4e1da;
  --accent: #2f5d7c;
  --accent-hover: #1f4560;
  --serif: "Iowan Old Style", Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151614;
    --text: #e8e6e1;
    --muted: #a3a19b;
    --rule: #2c2d2a;
    --accent: #8fb8d6;
    --accent-hover: #b5d2e7;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--bg); padding: 0.4rem 0.8rem; }
.skip:focus { left: 0.5rem; z-index: 10; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; }
.brand-icon { width: 32px; height: 32px; border-radius: 50%; }
.brand-name { font-family: var(--serif); font-size: 1.05rem; }
.nav { display: flex; gap: 1.1rem; list-style: none; margin: 0; padding: 0; font-size: 0.92rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }

/* Intro */
.intro { padding-top: 4.5rem; padding-bottom: 2.5rem; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.2; letter-spacing: -0.005em; }
h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin: 0 0 0.4rem; }
.role { color: var(--muted); margin: 0 0 0.6rem; }
.links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; list-style: none; padding: 0; margin: 0 0 2rem; font-size: 0.95rem; }
.lede { font-size: 1.15rem; margin: 0 0 1rem; }
.label { font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 1.75rem 0 0.6rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem 0.45rem; list-style: none; padding: 0; margin: 0; }
.tags li { font-size: 0.88rem; line-height: 1.4; padding: 0.2rem 0.65rem; border: 1px solid var(--rule); border-radius: 999px; }

/* Sections */
.block { padding-top: 2.25rem; padding-bottom: 0.5rem; border-top: 1px solid var(--rule); margin-top: 1.5rem; scroll-margin-top: 4rem; }
h2 { font-size: 1.45rem; margin: 0 0 1.1rem; }
h3 { font-size: 1.1rem; margin: 2rem 0 0.75rem; }
p { margin: 0 0 1rem; }

#research h3:first-of-type { margin-top: 0.25rem; }
.projects { list-style: none; padding: 0; margin: 0 0 0.5rem; }
.projects li { margin-bottom: 1.25rem; padding-left: 1rem; border-left: 2px solid var(--rule); }
.projects p { margin: 0; }
.p-title { font-weight: 600; }
.p-desc { color: var(--muted); margin-top: 0.1rem; }
.p-meta { font-size: 0.92rem; margin-top: 0.2rem; color: var(--muted); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; }

.gallery { list-style: none; padding: 0; margin: 0 0 0.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.gallery li { width: 9.5rem; }
.gallery a { display: block; border-radius: 4px; overflow: hidden; }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--rule); transition: opacity 0.15s; }
.gallery a:hover img { opacity: 0.85; }
.g-cap { display: block; font-size: 0.78rem; line-height: 1.35; color: var(--muted); margin-top: 0.3rem; }

/* Photo viewer */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 1100px); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(10, 10, 10, 0.88); }
.lb-img { display: block; max-width: min(92vw, 1100px); max-height: 82vh; width: auto; height: auto; border-radius: 4px; }
.lb-cap { color: #e8e6e1; font-size: 0.9rem; text-align: center; margin: 0.6rem 0 0; }
.lb-btn { position: fixed; background: rgba(255, 255, 255, 0.12); color: #fff; border: 0; border-radius: 999px; width: 2.75rem; height: 2.75rem; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, 0.24); }
.lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lb-close { right: 1rem; top: 1rem; }

.contact { margin: 0 0 1rem; }
.contact > div { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; padding: 0.2rem 0; }
.contact dt { color: var(--muted); }
.contact dd { margin: 0; overflow-wrap: anywhere; }

.pubs { margin: 0 0 1.25rem; padding-left: 1.4rem; }
.pubs li { margin-bottom: 1rem; padding-left: 0.25rem; }
.pubs span { display: inline; }
.pubs .title { font-weight: 500; }
.pubs a { font-size: 0.9rem; white-space: nowrap; }
.more { color: var(--muted); font-size: 0.95rem; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: 0.45rem 0; }
.when { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.95rem; }

/* Footer */
.site-footer { margin-top: 3rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.88rem; }
.site-footer p { margin: 1.25rem 0 2rem; }

/* Phone widths */
@media (max-width: 600px) {
  .nav { gap: 0.8rem; font-size: 0.85rem; }
  .brand-name { display: none; }
  .intro { padding-top: 3rem; }
  .timeline li { grid-template-columns: 1fr; gap: 0; }
  .gallery { gap: 0.5rem; }
  .gallery li { width: calc((100% - 1rem) / 3); }
  .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; }
  .pubs a { white-space: normal; word-break: break-all; }
}
