/* ==========================================================================
   Dr. Lot Shafai — Website Stylesheet
   One shared file for all four pages.
   ========================================================================== */

/* --- Color & typography variables (change these to re-theme the whole site) --- */
:root {
  --cream: #f5efe4;
  --cream-deep: #ece3d1;
  --ink: #1a2638;           /* deep navy, used for most text */
  --ink-soft: #3d4a5f;
  --signal: #c95a2c;        /* warm orange accent — "signal" color */
  --signal-deep: #a04520;
  --gold: #b89968;
  --line: #cfc4ad;
  --shadow: 0 1px 2px rgba(26, 38, 56, 0.06), 0 8px 24px rgba(26, 38, 56, 0.08);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Subtle paper texture using a gradient mesh — creates atmosphere */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 10%, rgba(184, 153, 104, 0.08), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(201, 90, 44, 0.06), transparent 45%);
  z-index: 0;
}

img { max-width: 100%; height: auto; display: block; }

/* --- Top navigation bar (shared across all pages) --- */
.site-header {
  position: relative;
  z-index: 10;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.brand {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand em {
  font-style: italic;
  color: var(--signal);
  font-weight: 400;
}
.site-nav { display: flex; gap: 28px; flex-wrap: wrap; }
.site-nav a {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 15px;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: 0.04em;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.site-nav a:hover { color: var(--signal); border-bottom-color: var(--signal); }
.site-nav a.active { color: var(--ink); border-bottom-color: var(--signal); }

/* --- General layout wrapper --- */
.page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 32px 96px;
}

/* --- Headings --- */
h1, h2, h3, h4 { font-family: 'Fraunces', Georgia, serif; color: var(--ink); line-height: 1.15; }
h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 0.4em;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 500;
  margin: 2.2em 0 0.6em;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.8em 0 0.4em;
  color: var(--ink);
}

p { margin: 0 0 1.1em; color: var(--ink-soft); }
a { color: var(--signal-deep); }
em { color: var(--ink); }
strong { color: var(--ink); font-weight: 600; }

/* Decorative section divider with a tiny "wave" SVG */
.wave-divider {
  display: block;
  margin: 48px auto;
  width: 80px;
  opacity: 0.6;
}

/* Small caps subtitle/eyebrow text */
.eyebrow {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 1rem;
  display: inline-block;
}

/* =============================================================
   HOME PAGE — hero block
   ============================================================= */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
  padding-top: 32px;
  animation: fadeUp 0.9s ease both;
}
.hero-title { font-size: clamp(2.8rem, 6vw, 5rem); line-height: 1.05; margin-bottom: 0.3em; }
.hero-title .accent { color: var(--signal); font-style: italic; font-weight: 400; }
.hero-lede {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 300;
  margin-bottom: 1.5em;
  max-width: 40ch;
}

/* Portrait frame with a soft shadow and a decorative corner mark */
.portrait-frame {
  position: relative;
  padding: 14px;
  background: white;
  box-shadow: var(--shadow);
}
.portrait-frame::after {
  content: "";
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: 80px;
  height: 80px;
  border-right: 2px solid var(--signal);
  border-bottom: 2px solid var(--signal);
  z-index: -1;
}
.portrait-frame img { background: var(--cream-deep); }
.portrait-caption {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 12px;
}

/* "At a glance" stats grid on the home page */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 64px 0;
  padding: 40px;
  background: white;
  border-top: 3px solid var(--signal);
  box-shadow: var(--shadow);
}
.stat { text-align: center; }
.stat-number {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.8rem;
  font-weight: 500;
  color: var(--signal);
  line-height: 1;
  display: block;
  margin-bottom: 8px;
}
.stat-label {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* At-a-glance list */
.glance-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 40px;
}
.glance-list li {
  padding-left: 24px;
  position: relative;
  color: var(--ink-soft);
}
.glance-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 14px;
  height: 1px;
  background: var(--signal);
}

/* CTA link (styled like an editorial "read more") */
.cta {
  display: inline-block;
  margin-top: 1em;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--signal);
  padding-bottom: 4px;
  transition: color 0.2s;
}
.cta:hover { color: var(--signal); }
.cta::after { content: " →"; color: var(--signal); }

/* =============================================================
   Content pages — about, science, honours
   ============================================================= */
.content {
  max-width: 720px;
  margin: 0 auto;
  animation: fadeUp 0.8s ease both;
}
.content p { font-size: 1.08rem; }
.content h2:first-of-type { margin-top: 0; }

/* Page title block with eyebrow + title */
.page-title {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

/* Pullquote / callout box */
.pullquote {
  border-left: 3px solid var(--signal);
  padding: 8px 0 8px 28px;
  margin: 2em 0;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink);
}

/* Cards for the "science in plain English" page */
.science-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin: 40px 0;
}
.science-card {
  background: white;
  padding: 32px 36px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--signal);
  position: relative;
}
.science-card h3 {
  margin-top: 0;
  font-size: 1.35rem;
  font-family: 'Fraunces', Georgia, serif;
  color: var(--ink);
}
.science-card .card-number {
  position: absolute;
  top: 24px;
  right: 28px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--gold);
}

/* Awards page — honour list styling */
.honour-block {
  background: white;
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  border-top: 2px solid var(--signal);
}
.honour-block h3 {
  margin-top: 0;
  margin-bottom: 0.3em;
  font-size: 1.2rem;
}
.honour-block .honour-year {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--signal);
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}
.honour-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}
.honour-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: baseline;
}
.honour-list li:last-child { border-bottom: none; }
.honour-list .award-year {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--signal);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.honour-list .award-name { color: var(--ink); }
.honour-list .award-name span { display: block; color: var(--ink-soft); font-size: 0.95rem; margin-top: 4px; }

/* =============================================================
   Footer
   ============================================================= */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--ink);
  color: var(--cream);
  padding: 56px 32px;
  margin-top: 80px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.footer-inner h4 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--cream);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 16px;
  font-weight: 500;
}
.footer-inner p, .footer-inner a {
  color: rgba(245, 239, 228, 0.75);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0 0 4px;
}
.footer-inner a { text-decoration: none; border-bottom: 1px solid rgba(201, 90, 44, 0.6); }
.footer-inner a:hover { color: var(--cream); }
.footer-bottom {
  max-width: 1100px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(245, 239, 228, 0.15);
  font-size: 0.85rem;
  color: rgba(245, 239, 228, 0.5);
  font-style: italic;
  font-family: 'Fraunces', Georgia, serif;
}

/* =============================================================
   Animations
   ============================================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================================
   Responsive — mobile friendly
   ============================================================= */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .glance-list { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .page { padding: 40px 22px 64px; }
  .nav-inner { padding: 16px 22px; }
  .site-nav { gap: 18px; }
  .stats { padding: 24px; }
  .honour-list li { grid-template-columns: 1fr; gap: 4px; }
}
