/* ===========================================================
   CHAMBERS OF SHIZA QURESHI
   Design tokens — "Ivory & Burgundy"
   Color:  --paper (#f7f0e2) main background, --paper-alt (#efe1c9) alt
           sections, --card (#fffdf8) card panels, --maroon (#6b1423)
           primary brand accent, --maroon-deep (#45101a) dark bands
           (footer / admin sidebar / login), --gold (#a97c3f) secondary
           accent on light backgrounds, --gold-bright (#c9a24e) accent
           on dark maroon backgrounds.
   Type:   "Fraunces" (serif, display/headings) + "Inter" (sans, body/UI)
   Layout: generous whitespace, left-aligned text, asymmetric hero,
           thin hairlines instead of card shadows/borders
   =========================================================== */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=Inter:wght@300;400;500;600;700&display=swap");

:root {
  /* Light backgrounds (used on every public page) */
  --paper: #f7f0e2;
  --paper-alt: #efe1c9;
  --card: #fffdf8;

  /* Deep burgundy — the primary brand color, echoing the chambers logo */
  --maroon: #6b1423;
  --maroon-deep: #45101a;

  /* Gold — secondary accent, echoing the gilded page edges in the branding */
  --gold: #a97c3f;
  --gold-bright: #c9a24e;

  /* Hairlines: maroon-tinted on light backgrounds, warm-white on dark bands */
  --line: rgba(107, 20, 35, 0.14);
  --line-strong: rgba(107, 20, 35, 0.28);
  --line-on-dark: rgba(244, 236, 224, 0.16);
  --line-on-dark-strong: rgba(244, 236, 224, 0.32);

  /* Text: warm charcoal on light backgrounds, warm ivory on dark bands */
  --text: #2a1216;
  --text-dim: #6d5a54;
  --text-on-dark: #f4ece0;
  --text-on-dark-dim: #d8c3b8;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --max: 1180px;
  --radius: 2px;
  --header-h: 76px;
}

@media (max-width: 640px) {
  :root { --header-h: 64px; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); font-weight: 400; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; max-width: 62ch; color: var(--text-dim); }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}
@media (max-width: 480px) {
  .container { padding: 0 18px; }
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--maroon);
  outline-offset: 3px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease, transform 0.2s ease;
  background: transparent;
  color: var(--text);
}
.btn:hover { border-color: var(--maroon); color: var(--maroon); }
.btn-primary {
  background: var(--maroon);
  color: var(--paper);
  border-color: transparent;
  font-weight: 600;
}
.btn-primary:hover { color: var(--paper); background: var(--maroon-deep); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--text-dim); }
.btn-ghost:hover { color: var(--maroon); border-color: var(--maroon); }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn-danger { border-color: #a33a2e; color: #a33a2e; }
.btn-danger:hover { border-color: #7a2a21; color: #7a2a21; }

/* ---------- Header / Nav ---------- */
header.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(247, 240, 226, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--text);
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.brand .brand-mark {
  width: 42px; height: 42px;
  flex-shrink: 0;
  display: inline-flex;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #fff;
}
.brand .brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.brand .brand-sub {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--maroon);
  font-weight: 600;
  align-self: center;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 34px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--text-dim);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  height: 1px; width: 0;
  background: var(--maroon);
  transition: width 0.25s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.nav-admin-link { font-size: 0.78rem; color: var(--text-dim); opacity: 0.7; }
.nav-admin-link:hover { color: var(--maroon); opacity: 1; }

.nav-toggle {
  display: none;
  background: none; border: none; color: var(--text);
  font-size: 1.6rem; cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
  padding: 4px;
}

@media (max-width: 880px) {
  .nav-links { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    background: var(--paper); flex-direction: column; padding: 40px 32px;
    gap: 26px; transform: translateX(100%); transition: transform 0.3s ease;
    overflow-y: auto; z-index: 99;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.2rem; }
  .nav-toggle { display: block; }
  .nav-admin-link { display: none; }
}

@media (max-width: 640px) {
  .brand { font-size: 1.05rem; gap: 8px; }
  .brand .brand-mark { width: 32px; height: 32px; }
  .brand-sub { display: none; }
}

@media (max-width: 400px) {
  .brand-name { max-width: 46vw; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--header-h);
  background:
    radial-gradient(ellipse at 75% 30%, rgba(107, 20, 35, 0.06), transparent 55%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-alt) 100%);
}
.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
  width: 100%;
}
.hero-ambient {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.hero-ambient .ring {
  position: absolute;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  right: 8%;
  top: 50%;
}
.hero-ambient .ring-1 { width: 620px; height: 620px; margin-top: -310px; animation: spin-slow 90s linear infinite; }
.hero-ambient .ring-2 { width: 460px; height: 460px; margin-top: -230px; opacity: 0.6; animation: spin-slow-reverse 70s linear infinite; }
.hero-ambient .glow {
  position: absolute;
  right: 6%; top: 50%;
  width: 520px; height: 520px;
  margin-top: -260px;
  background: radial-gradient(circle, rgba(169, 124, 63, 0.14), transparent 68%);
  filter: blur(10px);
}
@keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes spin-slow-reverse { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) {
  .hero-ambient .ring-1, .hero-ambient .ring-2 { animation: none; }
}
@media (max-width: 880px) {
  .hero-ambient { display: none; }
}

.hero-eyebrow {
  font-size: 0.8rem;
  color: var(--maroon);
  letter-spacing: 0.04em;
  margin-bottom: 20px;
  font-weight: 600;
}
.hero-title { color: var(--text); margin-bottom: 0.28em; }
.hero-title .last { display: block; color: var(--maroon); font-style: normal; font-weight: 400; }
.hero-role {
  font-size: 1.15rem;
  color: var(--text-dim);
  margin-bottom: 1.3em;
  max-width: 46ch;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.hero-visual-space { min-height: 420px; position: relative; z-index: 3; }

/* ---------- 3D tilt photo system (hero + about) ---------- */
.tilt-wrap {
  --tilt-shadow: 0 30px 60px rgba(42, 18, 22, 0.22);
  animation: floaty 6.5s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@media (prefers-reduced-motion: reduce) {
  .tilt-wrap { animation: none; }
}

.tilt-card {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out, box-shadow 0.3s ease;
  box-shadow: var(--tilt-shadow);
  will-change: transform;
}
.tilt-card.tilt-active { transition: transform 0.05s linear, box-shadow 0.3s ease; }
.tilt-sheen {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero-photo-frame {
  width: min(360px, 88%);
  aspect-ratio: 3 / 4;
  margin-left: auto;
  margin-right: 6%;
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, var(--card), var(--paper-alt));
  overflow: hidden;
}
.hero-photo-frame::before {
  content: "";
  position: absolute; inset: 10px;
  border: 1px solid var(--line);
  pointer-events: none;
  z-index: 2;
}
.hero-photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 4.4rem; color: var(--maroon); opacity: 0.28;
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual-space {
    min-height: 0;
    margin-top: 36px;
    display: flex;
    justify-content: center;
  }
  .hero-photo-frame {
    width: min(300px, 72vw);
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .hero-photo-frame { width: min(260px, 78vw); }
}

/* ---------- Sections ---------- */
section { padding: 108px 0; position: relative; }
.section-tight { padding: 72px 0; }
@media (max-width: 640px) {
  section { padding: 64px 0; }
  .section-tight { padding: 48px 0; }
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 52px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
}
.section-head h2 { margin-bottom: 6px; }
.section-head p { margin: 0; }
.section-alt { background: var(--paper-alt); }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 26px;
}
.glass-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: 0 1px 3px rgba(42, 18, 22, 0.05);
  transition: border-color 0.3s ease, transform 0.35s ease, box-shadow 0.3s ease;
  position: relative;
}
.glass-card:hover { border-color: var(--line-strong); transform: translateY(-4px); box-shadow: 0 14px 28px rgba(42, 18, 22, 0.09); }
.glass-card .card-icon { font-size: 1.6rem; margin-bottom: 16px; display: block; }
.glass-card h3 { margin-bottom: 10px; color: var(--text); }
.glass-card p { font-size: 0.94rem; margin-bottom: 0; }

.media-card {
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 1px 3px rgba(42, 18, 22, 0.05);
}
.media-card .thumb {
  aspect-ratio: 4/3;
  background: var(--paper-alt);
  overflow: hidden;
  position: relative;
}
.media-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.media-card:hover .thumb img { transform: scale(1.06); }
.media-card .body { padding: 20px 22px 24px; }
.media-card .meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--maroon);
  margin-bottom: 10px; letter-spacing: 0.02em;
  font-weight: 600;
}
.media-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.media-card p { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 0; }
.no-image-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--maroon); opacity: 0.35; font-family: var(--serif);
  font-size: 2.2rem;
}

/* ---------- Timeline (Achievements) ---------- */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 1px;
  background: var(--line-strong);
}
.timeline-item {
  position: relative;
  padding-bottom: 44px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -34px; top: 4px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--maroon);
}
.timeline-content { flex: 1; min-width: 0; }
.timeline-thumb {
  flex-shrink: 0;
  width: 160px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--paper-alt);
}
.timeline-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.timeline-year { font-family: var(--serif); font-size: 1.6rem; color: var(--maroon); margin-bottom: 6px; }
.timeline-item h3 { margin-bottom: 6px; }
.timeline-item .org { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 10px; display: block; }

@media (max-width: 640px) {
  .timeline-item { flex-direction: column; }
  .timeline-thumb { width: 100%; max-width: 220px; }
}

/* ---------- About page ---------- */
.about-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 60px;
  align-items: start;
}
.about-portrait {
  width: 100%;
  aspect-ratio: 4/5;
  background: linear-gradient(160deg, var(--card), var(--paper-alt));
  border: 1px solid var(--line-strong);
  overflow: hidden;
}
.about-portrait img { width: 100%; height: 100%; object-fit: cover; }
.about-portrait .placeholder-mark {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 4rem; color: var(--maroon); opacity: 0.3;
}
.about-tilt-wrap { max-width: 320px; }
@media (max-width: 780px) { .about-hero { grid-template-columns: 1fr; } .about-tilt-wrap { max-width: 280px; } }

.info-list { list-style: none; padding: 0; margin: 0 0 28px; }
.info-list li {
  display: grid; grid-template-columns: 160px 1fr; gap: 18px;
  padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 0.94rem;
}
.info-list li span:first-child { color: var(--maroon); font-weight: 600; }
.info-list li span:last-child { color: var(--text-dim); }
@media (max-width: 480px) {
  .info-list li { grid-template-columns: 1fr; gap: 4px; }
}

.expertise-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.expertise-tags span {
  border: 1px solid var(--line-strong); padding: 8px 16px; font-size: 0.84rem;
  color: var(--text-dim); border-radius: 999px;
}

/* ---------- Filters ---------- */
.filter-row {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 42px;
}
.filter-btn {
  padding: 9px 18px; font-size: 0.84rem; border: 1px solid var(--line);
  background: transparent; color: var(--text-dim); cursor: pointer; border-radius: 999px;
  transition: all 0.2s ease;
}
.filter-btn.active, .filter-btn:hover { border-color: var(--maroon); color: var(--maroon); }

.search-row { display: flex; gap: 12px; margin-bottom: 30px; }
.search-row input {
  flex: 1; background: var(--card); border: 1px solid var(--line); color: var(--text);
  padding: 12px 16px; font-family: var(--sans); font-size: 0.92rem; border-radius: var(--radius);
}
.search-row input:focus { border-color: var(--maroon); outline: none; }

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-dim);
  border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty-state h3 { color: var(--text-dim); }

.loading-row { padding: 40px 0; text-align: center; color: var(--text-dim); font-size: 0.9rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
@media (max-width: 780px) { .contact-grid { grid-template-columns: 1fr; } }
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-size: 0.84rem; color: var(--maroon); margin-bottom: 8px; font-weight: 600; }
.form-field input, .form-field textarea {
  width: 100%; background: var(--card); border: 1px solid var(--line); color: var(--text);
  padding: 13px 16px; font-family: var(--sans); font-size: 0.94rem; border-radius: var(--radius);
  resize: vertical;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--maroon); }
.contact-detail { margin-bottom: 28px; }
.contact-detail .label { font-size: 0.78rem; color: var(--maroon); letter-spacing: 0.04em; margin-bottom: 6px; font-weight: 600; }
.contact-detail .value { font-size: 1.05rem; color: var(--text); }
.social-row { display: flex; gap: 16px; margin-top: 30px; }
.social-row a {
  width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--text-dim);
  transition: all 0.2s ease; font-size: 0.95rem;
}
.social-row a:hover { color: var(--maroon); border-color: var(--maroon); }
.form-status { margin-top: 14px; font-size: 0.88rem; }
.form-status.success { color: #1f6b3d; }
.form-status.error { color: #a33a2e; }

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--line-on-dark);
  padding: 60px 0 34px;
  background: var(--maroon-deep);
  color: var(--text-on-dark-dim);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }
.footer-grid h4 { font-size: 0.8rem; color: var(--gold-bright); letter-spacing: 0.04em; margin-bottom: 18px; font-family: var(--sans); font-weight: 600; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a, .footer-grid p { color: var(--text-on-dark-dim); font-size: 0.9rem; }
.footer-grid a:hover { color: var(--text-on-dark); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-top: 26px; border-top: 1px solid var(--line-on-dark);
  font-size: 0.8rem; color: var(--text-on-dark-dim);
}
.footer-bottom a { color: var(--text-on-dark-dim); }
.footer-bottom a:hover { color: var(--gold-bright); }

/* ---------- Page hero (non-home pages) ---------- */
.page-hero {
  padding: calc(var(--header-h) + 92px) 0 60px;
  background: linear-gradient(180deg, var(--paper-alt), var(--paper));
  border-bottom: 1px solid var(--line);
}
.page-hero .hero-eyebrow { margin-bottom: 14px; }
@media (max-width: 640px) {
  .page-hero { padding: calc(var(--header-h) + 48px) 0 40px; }
}
.page-hero p { margin-top: 14px; }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
@media (max-width: 780px) { .two-col { grid-template-columns: 1fr; } }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }