/* ==========================================================================
   drelsayed.com — site styles
   Edit the tokens in :root to change the whole site's colors and type.
   ========================================================================== */

:root {
  --ink: #14212b;
  --ink-soft: #4a5a66;
  --paper: #fbfaf7;
  --tint: #f1efe8;
  --line: #e2ded3;
  --brand: #0f4c5c;        /* deep teal */
  --brand-ink: #ffffff;
  --brand-soft: #e3eef0;
  --accent: #b5703a;       /* warm copper, used sparingly */
  --danger-bg: #fbeee8;

  --display: "Marcellus", Georgia, "Times New Roman", serif;   /* headings */
  --body: "PT Serif", Georgia, "Times New Roman", serif;        /* everything else */

  --radius: 14px;
  --container: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(56px, 9vw, 104px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.7 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .75em;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  background: var(--brand); color: var(--brand-ink); text-decoration: none;
  font: 700 .98rem/1 var(--body); padding: 15px 24px; border-radius: 999px;
  border: 2px solid var(--brand); cursor: pointer; transition: transform .15s, background .15s;
}
.btn:hover { background: #0b3a47; border-color: #0b3a47; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.btn-small { padding: 10px 18px; font-size: .9rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 247, .9); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%; background: var(--brand); color: #fff; flex-shrink: 0;
  display: grid; place-items: center; font: 400 1rem/1 var(--display); letter-spacing: .02em;
}
.brand-text { font: 400 1.15rem/1.1 var(--display); display: flex; flex-direction: column; }
.brand-text small { font: 700 .72rem/1.4 var(--body); color: var(--ink-soft); letter-spacing: .06em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; }
.site-nav a:not(.btn):hover { color: var(--brand); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle .bar { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: 16px; }
  .nav-toggle[aria-expanded="true"] .bar:first-of-type { transform: translateY(3.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bar:last-of-type { transform: translateY(-3.5px) rotate(-45deg); }
}

/* Hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 var(--section-y); }
.hero-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(32px, 6vw, 72px); align-items: center; }
.ubc-logo { width: min(260px, 70%); height: auto; margin-bottom: 28px; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.hero-photo { margin: 0; position: relative; max-width: 460px; justify-self: center; width: 100%; }
.hero-photo::before {
  content: ""; position: absolute; inset: 24px -24px -24px 24px; border-radius: var(--radius);
  background: var(--brand-soft); z-index: -1;
}
.hero-photo img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; width: 100%; background: #fff; }
.h1-sub { display: block; font-size: .62em; font-weight: 400; color: var(--brand); margin-top: .35em; }

/* Sections */
.section { padding: var(--section-y) 0; }
.section-tint { background: var(--tint); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: clamp(24px, 5vw, 64px); }
.prose { font-size: 1.05rem; }
.prose p { color: var(--ink); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; margin-top: 32px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px -16px rgba(20, 33, 43, .25); }
.card h3 { color: var(--brand); }
.card p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

.card-icon { width: 44px; height: 44px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }

/* Referral band */
.referral-band { background: var(--brand); color: #fff; padding: clamp(48px, 7vw, 80px) 0; }
.referral-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 32px; align-items: center; }
.referral-band h2 { color: #fff; margin: 0; }
.eyebrow-light { color: #f0c9a6; }
.referral-numbers { display: flex; flex-direction: column; gap: 14px; }
.big-number {
  display: flex; align-items: baseline; gap: 16px; color: #fff; text-decoration: none;
  font: 400 clamp(1.8rem, 4.5vw, 2.8rem)/1.1 var(--display); letter-spacing: .01em;
}
.big-number span { font: 700 .8rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: #f0c9a6; width: 2.6em; }
.big-number-alt { font-size: clamp(1.2rem, 2.6vw, 1.5rem); opacity: .85; }
.big-number:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* About */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(32px, 6vw, 72px); align-items: start; }
.about-photo { margin: 0; max-width: 440px; }
.about-photo img { border-radius: var(--radius); aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.about-photo figcaption { font-size: .82rem; color: var(--ink-soft); margin-top: 10px; font-style: italic; }
.team-list { list-style: none; padding: 0; margin: 0; }
.team-list li { padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 700; }
.team-list small { display: block; color: var(--ink-soft); font-weight: 400; font-size: .88rem; }
.credentials { font-weight: 700; color: var(--brand); margin-top: -.25em; }
.credentials span { font-weight: 400; color: var(--ink-soft); font-size: .92rem; }

/* CV */
.cv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: clamp(32px, 6vw, 72px); }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 22px 22px; display: flex; flex-direction: column; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--brand); }
.timeline .when { font-size: .8rem; font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.timeline .what { display: flex; flex-direction: column; color: var(--ink-soft); font-size: .95rem; }
.timeline .what strong { color: var(--ink); font-weight: 700; }

/* Contact */
.contact-list { list-style: none; padding: 0; margin: 0; align-self: center; }
.contact-list li { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.contact-list address { font-style: normal; }
.contact-list span { width: 64px; flex-shrink: 0; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); padding-top: 3px; }
.notice { background: var(--danger-bg); border-left: 4px solid var(--accent); padding: 14px 18px; border-radius: 6px; font-size: .93rem; }

/* Footer */
.site-footer { background: var(--ink); color: #c9d2d8; padding: 48px 0; font-size: .88rem; }
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.site-footer a { color: #fff; }
.footer-brand { color: #fff; font: 400 1.3rem/1.2 var(--display); margin-bottom: .4em; }
.footer-head { color: #fff; font-weight: 700; margin-bottom: .4em; }
.footer-legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); font-size: .8rem; color: #93a3ad; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-legal p { margin: 0; }

/* Simple standalone pages (thanks, 404) */
.simple-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: var(--section-y) var(--gutter); }
.simple-page p { color: var(--ink-soft); max-width: 32em; margin-inline: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
