/* Shahid Mahmood Official — memorial static site
   Clean, dignified typography. Mobile-first. */
:root {
  --bg: #f6f1e8;
  --bg-card: #fffdf8;
  --ink: #2a2723;
  --ink-soft: #5c574f;
  --line: #d9d0c1;
  --accent: #6e3d2e;
  --accent-soft: #8a5a45;
  --gold: #a58b5c;
  --placeholder: #efe8db;
  --max: 44rem;
  --header-max: 68rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--accent-soft); }
img { max-width: 100%; height: auto; display: block; }
.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus { left: 1rem; top: 1rem; background: #fff; padding: 0.5rem 1rem; z-index: 10; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(246, 241, 232, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.header-inner {
  max-width: var(--header-max);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}
.wordmark {
  font-family: "Cormorant Garamond", "Palatino Linotype", Palatino, Georgia, serif;
  font-weight: 500;
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.2;
}
.wordmark:hover { color: var(--accent); }
.wordmark span {
  display: block;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
  margin-top: 0.15rem;
}
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.15rem;
}
nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
nav a:hover, nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
}

main {
  flex: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}
.hero {
  text-align: center;
  padding: 2.5rem 0 2rem;
}
.hero h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: 1.1;
  margin: 0 0 0.6rem;
  letter-spacing: 0.02em;
}
.hero .rule {
  width: 4rem;
  height: 1px;
  background: var(--gold);
  border: 0;
  margin: 1.1rem auto;
}
.hero .dates, .hero .tagline {
  color: var(--ink-soft);
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.hero .tagline { font-style: italic; margin-top: 0.35rem; }

.section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 2.5rem;
}
@media (min-width: 560px) {
  .section-grid { grid-template-columns: 1fr 1fr; }
}
.section-grid a {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 1.15rem 1.2rem 1.2rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.section-grid a:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}
.section-grid h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: 1.55rem;
  margin: 0 0 0.25rem;
  color: var(--accent);
}
.section-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.page-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 0 0 1.75rem;
  text-align: center;
  letter-spacing: 0.03em;
}
.page-title:after {
  content: "";
  display: block;
  width: 3.2rem;
  height: 1px;
  background: var(--gold);
  margin: 0.9rem auto 0;
}

.tribute {
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 1.4rem 1.4rem 1.2rem;
  margin: 0 0 1.35rem;
}
.tribute p { margin: 0 0 0.9rem; }
.tribute p:last-child { margin-bottom: 0; }
.tribute .attr {
  margin: 0.2rem 0 0;
  text-align: right;
  font-weight: 600;
  color: var(--accent);
  font-size: 0.95rem;
}
.tribute .caption {
  font-size: 0.95rem;
  color: var(--ink-soft);
  font-style: italic;
}
.poem {
  white-space: pre-line;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0.6rem 0;
}

.photo-missing {
  background: var(--placeholder);
  border: 1px dashed var(--gold);
  min-height: 12rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  margin: 0.6rem 0 1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}
.photo-missing strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
figure { margin: 0 0 1.2rem; }
figcaption {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-top: 0.55rem;
}

.media-list { list-style: none; padding: 0; margin: 0; }
.media-list li {
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 1.2rem 1.3rem;
  margin: 0 0 1rem;
}
.media-list a { word-break: break-word; }
.note {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-top: 0.35rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 1.25rem 2rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.site-footer p { margin: 0; }

@media (max-width: 640px) {
  .header-inner { padding: 0.85rem 1rem; }
  nav ul { gap: 0.15rem 0.85rem; }
  .tribute { padding: 1.15rem 1rem 1rem; }
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.wordmark img {
  height: 42px;
  width: auto;
}
.wordmark .text span { display: block; }

.gallery {
  column-count: 1;
  column-gap: 0.7rem;
  margin-top: 2.25rem;
}
@media (min-width: 560px) {
  .gallery { column-count: 2; }
}
@media (min-width: 900px) {
  main.wide { max-width: 68rem; }
  .gallery { column-count: 3; }
}
.gallery figure {
  margin: 0 0 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  overflow: hidden;
  break-inside: avoid;
}
.gallery img, .photo img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}
.photo {
  margin: 0 0 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  overflow: hidden;
}
.photo img { width: 100%; }
.gallery-intro {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0 0 0.25rem;
}
.media-list li img {
  width: 100%;
  margin: 0 0 0.75rem;
  border: 1px solid var(--line);
}
