/* 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; white-space: nowrap; }
.site-header .wrap { max-width: 58rem; }
.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; }
.intro { position: relative; }
.intro > *:not(.hero-art) { position: relative; }
.hero-art { display: none; position: absolute; pointer-events: none; user-select: none; }
@media (min-width: 900px) and (max-width: 1319px) {
  .hero-art { display: block; width: 250px; top: 1.5rem; right: -2rem; opacity: 0.16; }
}
@media (min-width: 1320px) {
  .hero-art { display: block; width: 340px; top: 2.5rem; right: -300px; opacity: 0.75; }
}
@media (prefers-color-scheme: dark) and (min-width: 1320px) { .hero-art { opacity: 0.85; } }
.brand-icon { border-radius: 0; }
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 { display: flex; }
.tag { font: inherit; font-size: 0.88rem; line-height: 1.4; padding: 0.2rem 0.65rem; color: var(--text);
  background: none; border: 1px solid var(--rule); border-radius: 999px; }
.js .tag { cursor: pointer; transition: border-color 0.15s, color 0.15s, background 0.15s; }
.js .tag:hover { border-color: var(--accent); color: var(--accent); }
.tag:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tag[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.tags-hint { display: none; color: var(--muted); font-size: 0.82rem; margin: -0.25rem 0 0.55rem; }
.js .tags-hint { display: block; }

/* Papers and resources for the clicked data tag (site.js) */
.tag-results { margin-top: 0.9rem; padding: 0.85rem 1rem; border: 1px solid var(--rule); border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 5%, var(--bg)); animation: area-in 0.2s ease; }
.tag-results-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.35rem; }
.tag-results-title { margin: 0; font-size: 0.88rem; color: var(--muted); }
.tag-results-title strong { color: var(--text); font-weight: 600; }
.tag-results-list { list-style: none; padding: 0; margin: 0; }
.tag-results-list li { padding: 0.5rem 0; border-top: 1px solid var(--rule); }
.tag-results-list li:first-child { border-top: 0; }
.tag-results-list a { font-weight: 600; color: var(--text); text-decoration-color: var(--rule); }
.tag-results-list a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.tr-meta { display: block; font-size: 0.84rem; color: var(--muted); }
.tag-results .wip { margin: 0.2rem 0 0.1rem; }

/* 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; }

/* Publications: year column, title first, authors, journal and a DOI button */
.pub-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.pub-list li { display: grid; grid-template-columns: 3.5rem 1fr; gap: 1rem; padding: 0.95rem 0; border-bottom: 1px solid var(--rule); }
.pub-list li:first-child { padding-top: 0.25rem; }
.pub-year { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.95rem; line-height: 1.5; }
.pub-body p { margin: 0; }
.pub-title { font-weight: 600; line-height: 1.45; }
.pub-authors { color: var(--muted); font-size: 0.9rem; margin-top: 0.2rem !important; }
.pub-authors b { color: var(--text); font-weight: 600; }
.pub-meta { color: var(--muted); font-size: 0.9rem; margin-top: 0.15rem !important; }
.pub-meta a { display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; line-height: 1.6;
  padding: 0 0.5rem; border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; vertical-align: 1px; }
.pub-meta a:hover { border-color: var(--accent); }
.pub-all { color: var(--muted); font-size: 0.95rem; }
.more { color: var(--muted); font-size: 0.95rem; }

/* Experience: a connected timeline in the network style; the current role has a highlighted node */
.career { list-style: none; padding: 0; margin: 0.25rem 0 1rem; }
.career li { position: relative; padding: 0 0 1.35rem 2.1rem; }
.career li::before { content: ""; position: absolute; left: 0.47rem; top: 0.9rem; bottom: -0.35rem; width: 2px;
  background: linear-gradient(#4fb38a, #2f5d9c); opacity: 0.45; }
.career li:last-child { padding-bottom: 0.25rem; }
.career li:last-child::before { display: none; }
.career li::after { content: ""; position: absolute; left: 0; top: 0.25rem; width: 1rem; height: 1rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #eafff5 0%, #4fb38a 45%, #2f5d9c 100%); box-shadow: 0 0 0 3px var(--bg); }
.career li.now::after { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px color-mix(in srgb, #4fb38a 30%, transparent); }
.career-when { display: block; color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.career-role { margin: 0.05rem 0 0; font-weight: 600; }
.career-place { margin: 0; color: var(--muted); }

.service { list-style: none; padding: 0; margin: 0; }
.service li { position: relative; padding-left: 1.4rem; margin-bottom: 0.55rem; }
.service li::before { content: ""; position: absolute; left: 0.25rem; top: 0.62em; width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: linear-gradient(135deg, #4fb38a, #2f5d9c); }

/* Research boxes: click one to show that area (site.js); without JavaScript both areas show. */
.area-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0.25rem 0 1.25rem; }
.area-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.3rem;
  padding: 1.4rem 1rem 1.1rem; font: inherit; color: var(--text); cursor: pointer;
  border: 1px solid var(--rule); border-radius: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--bg)) 0%, var(--bg) 70%);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.area-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -18px rgba(15, 40, 60, 0.45); }
.area-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.area-card[aria-expanded="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.area-card img { width: 88px; height: 88px; margin-bottom: 0.2rem; transition: transform 0.25s ease; }
.area-card:hover img { transform: translateY(-3px) scale(1.05) rotate(-2deg); }
.area-title { font-family: var(--serif); font-size: 1.2rem; line-height: 1.25; }
.area-sub { color: var(--muted); font-size: 0.88rem; line-height: 1.4; }
.area-more { font-size: 0.8rem; color: var(--accent); margin-top: 0.25rem; }
.js .area-more::after { content: " ▾"; display: inline-block; transition: transform 0.2s; }
.js .area-card[aria-expanded="true"] .area-more::after { transform: rotate(180deg); }
.area-panel { animation: area-in 0.25s ease; }
/* Open panel: a header row (title and Close) and a Back button at the end; both added by site.js */
.area-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0.5rem 0 0.75rem; }
.area-head h3 { margin: 0; }
.area-close, .area-back { font: inherit; cursor: pointer; background: none; border: 1px solid var(--rule); border-radius: 999px; }
.area-close { margin-left: auto; font-size: 0.82rem; color: var(--muted); padding: 0.15rem 0.65rem; white-space: nowrap; }
.area-back { display: inline-block; margin: 0.5rem 0 0.75rem; font-size: 0.9rem; color: var(--accent); padding: 0.4rem 0.95rem; }
.area-close:hover, .area-back:hover { border-color: var(--accent); color: var(--accent); }
.area-close:focus-visible, .area-back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* A box that is a plain link (Newsletter): same look, no open/close arrow */
a.area-card { text-decoration: none; }
.js .link-card .area-more::after { content: none; }
.link-card { margin-bottom: 0.75rem; }
/* Icon-only box (Newsletter): opens a short work-in-progress note */
.area-cards.icon-only { grid-template-columns: 1fr; justify-items: start; }
.area-card.icon-card { width: 11rem; padding: 1.2rem 1rem 1rem; }
.wip { color: var(--muted); font-style: italic; margin: 0 0 0.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* A single wide box (Publications): icon on the left, text on the right */
.area-cards.single { grid-template-columns: 1fr; margin-bottom: 0.6rem; }
.area-card.wide { flex-direction: row; text-align: left; align-items: center; gap: 1.25rem; padding: 1.1rem 1.5rem; }
.area-card.wide img { width: 80px; height: 80px; margin: 0; flex: none; }
.area-text { display: flex; flex-direction: column; gap: 0.2rem; }
@keyframes area-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .area-card, .area-card img, .area-panel, .js .area-more::after { transition: none; animation: none; }
  .area-card:hover, .area-card:hover img { transform: none; }
}

/* Collaborator sign-in, top bar */
.nav .signin { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.65rem;
  border: 1px solid var(--rule); border-radius: 999px; color: var(--muted); white-space: nowrap; }
.nav .signin:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 860px) {
  .nav .signin { padding: 0.25rem 0.45rem; }
  .nav .signin span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Network clusters in the side margins on wide screens: the one beside the name, one beside Research (left)
   and one beside Experience (right). Each reaches a little behind the text and fades out there. */
main { position: relative; z-index: 0; }
.block { position: relative; }
.net-art { display: none; position: absolute; z-index: -1; pointer-events: none; user-select: none; }
@media (min-width: 1320px) {
  .net-art { display: block; opacity: 0.7; }
  .net-left { width: 340px; left: -262px; top: 1.75rem;
    -webkit-mask-image: linear-gradient(to right, #000 60%, rgba(0, 0, 0, 0.15) 100%);
            mask-image: linear-gradient(to right, #000 60%, rgba(0, 0, 0, 0.15) 100%); }
  .net-right { width: 380px; right: -296px; top: 2.5rem;
    -webkit-mask-image: linear-gradient(to left, #000 62%, rgba(0, 0, 0, 0.15) 100%);
            mask-image: linear-gradient(to left, #000 62%, rgba(0, 0, 0, 0.15) 100%); }
  .hero-art { right: -276px;
    -webkit-mask-image: linear-gradient(to left, #000 65%, rgba(0, 0, 0, 0.18) 100%);
            mask-image: linear-gradient(to left, #000 65%, rgba(0, 0, 0, 0.18) 100%); }
}
@media (prefers-color-scheme: dark) and (min-width: 1320px) { .net-art { opacity: 0.82; } }

/* 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; }
  .pub-list li { grid-template-columns: 1fr; gap: 0.15rem; }
  .gallery { gap: 0.5rem; }
  .area-cards { gap: 0.6rem; }
  .area-card { padding: 1rem 0.6rem 0.9rem; }
  .area-card img { width: 64px; height: 64px; }
  .area-card.wide { padding: 0.9rem 1rem; gap: 0.9rem; }
  .area-card.wide img { width: 60px; height: 60px; }
  .area-title { font-size: 1.05rem; }
  .area-sub { font-size: 0.8rem; }
  .nav .signin { padding: 0.25rem 0.45rem; }
  .nav .signin span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .gallery li { width: calc((100% - 1rem) / 3); }
  .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; }
}
.life { color: var(--muted); }
@media (max-width: 430px) {
  .nav { gap: 0.7rem; }
  .nav .nav-exp { display: none; }
}
.section-sub { color: var(--muted); font-style: italic; margin: -0.6rem 0 1rem; }
