/* McMaster University Personal Website — Dr. Mohamed S. Hamed */
/* Brand: Heritage Maroon #7A003C | Gold #FDBF57 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --maroon:       #7A003C;
  --maroon-dark:  #560028;
  --maroon-light: #9a1a55;
  --gold:         #FDBF57;
  --gold-dark:    #e0a030;
  --white:        #ffffff;
  --light:        #f8f7f7;
  --gray:         #f0eeee;
  --border:       #e2dede;
  --text:         #2d2d2d;
  --text-muted:   #666666;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
}

/* ── NAVIGATION ─────────────────────────────────────────────────── */
.site-nav {
  background: var(--maroon);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.25;
  padding: 14px 0;
  letter-spacing: 0.01em;
}

.nav-brand span {
  display: block;
  font-weight: 300;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.75);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

.nav-links a {
  display: block;
  padding: 18px 14px;
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  transition: color 0.18s, background 0.18s;
  border-bottom: 3px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ── HERO (homepage only) ───────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--maroon-dark) 0%, var(--maroon) 60%, var(--maroon-light) 100%);
  color: var(--white);
  padding: 72px 24px 64px;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-photo {
  flex-shrink: 0;
  width: 180px;
  height: 220px;
  border-radius: 8px;
  overflow: hidden;
  border: 4px solid var(--gold);
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  text-align: center;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.hero-text { flex: 1; min-width: 240px; }

.hero-name {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.hero-title {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--gold);
  margin-bottom: 4px;
}

.hero-credentials {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 20px;
}

.hero-dept {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
}

.hero-dept a {
  color: var(--gold);
  text-decoration: none;
}

.hero-dept a:hover { text-decoration: underline; }

/* ── PAGE HEADER (all other pages) ─────────────────────────────── */
.page-header {
  background: var(--maroon);
  padding: 40px 24px 36px;
  color: var(--white);
}

.page-header-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.page-header p {
  color: rgba(255,255,255,0.75);
  font-size: 0.92rem;
}

/* ── MAIN CONTENT ───────────────────────────────────────────────── */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 52px 24px 72px;
}

/* ── SECTION HEADINGS ───────────────────────────────────────────── */
.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--maroon);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--gold);
  letter-spacing: -0.01em;
}

.section-gap { margin-top: 52px; }

/* ── CARDS ──────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--maroon);
  border-radius: 6px;
  padding: 22px 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(122,0,60,0.1);
  transform: translateY(-2px);
}

.card-icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--maroon);
  margin-bottom: 8px;
}

.card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── COURSE CARDS ───────────────────────────────────────────────── */
.course-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}

.course-card:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

.course-code {
  display: inline-block;
  background: var(--maroon);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}

.course-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.course-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.course-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.84rem;
  color: var(--maroon);
  font-weight: 500;
  text-decoration: none;
}

.course-link:hover { text-decoration: underline; }

/* ── PUBLICATIONS ───────────────────────────────────────────────── */
.pub-list {
  counter-reset: pub-counter;
}

.pub-item {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
  font-size: 0.92rem;
  line-height: 1.65;
}

.pub-item:last-child { border-bottom: none; }

.pub-num {
  flex-shrink: 0;
  width: 32px;
  text-align: right;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding-top: 2px;
}

.pub-text { flex: 1; }

.pub-text b { color: var(--text); }

.pub-text a {
  color: var(--maroon);
  word-break: break-all;
}

.pub-text a:hover { text-decoration: none; }

.pub-award {
  display: inline-block;
  background: #fff8e6;
  border: 1px solid var(--gold);
  color: #7a5a00;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
}

.pub-keynote {
  display: inline-block;
  background: #f0e6f0;
  border: 1px solid var(--maroon-light);
  color: var(--maroon);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
}

.pub-year-header {
  background: var(--gray);
  border-left: 4px solid var(--maroon);
  padding: 10px 16px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--maroon);
  margin: 28px 0 0;
  border-radius: 0 4px 4px 0;
}

/* ── CONTACT BOX ────────────────────────────────────────────────── */
.contact-box {
  background: var(--light);
  border: 1px solid var(--border);
  border-top: 4px solid var(--gold);
  border-radius: 8px;
  padding: 28px 32px;
  max-width: 480px;
}

.contact-box h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--maroon);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
}

.contact-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  align-items: flex-start;
}

.contact-label {
  flex-shrink: 0;
  width: 70px;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.82rem;
  padding-top: 2px;
}

.contact-value a {
  color: var(--maroon);
  text-decoration: none;
}

.contact-value a:hover { text-decoration: underline; }

/* ── STAT CHIPS ─────────────────────────────────────────────────── */
.stat-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.stat-chip {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(253,191,87,0.4);
  border-radius: 6px;
  padding: 12px 20px;
  text-align: center;
  min-width: 120px;
}

.stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  margin-top: 4px;
}

/* ── QUICK LINKS (homepage) ─────────────────────────────────────── */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.18s, background 0.18s;
}

.quick-link:hover {
  border-color: var(--maroon);
  background: #fff0f6;
  color: var(--maroon);
}

.quick-link-icon {
  color: var(--maroon);
  font-size: 1.1rem;
}

/* ── TWO-COLUMN LAYOUT ──────────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 700px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ── LISTS ──────────────────────────────────────────────────────── */
.content-list {
  list-style: none;
  padding: 0;
}

.content-list li {
  padding: 6px 0 6px 20px;
  position: relative;
  font-size: 0.92rem;
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
}

.content-list li:last-child { border-bottom: none; }

.content-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--maroon);
}

/* ── EXPERIENCE SECTION ─────────────────────────────────────────── */
.exp-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 20px;
}

.exp-block h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--maroon);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.exp-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--maroon);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.exp-block ul {
  list-style: disc;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.exp-block p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ── BADGES ─────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  background: var(--light);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 99px;
  font-weight: 500;
}

.badge-maroon {
  background: #f5e6ed;
  border-color: #c07095;
  color: var(--maroon);
}

/* ── FOOTER ─────────────────────────────────────────────────────── */
.site-footer {
  background: var(--maroon-dark);
  color: rgba(255,255,255,0.65);
  padding: 32px 24px;
  font-size: 0.84rem;
  margin-top: 64px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-inner a {
  color: var(--gold);
  text-decoration: none;
}

.footer-inner a:hover { text-decoration: underline; }

/* ── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-inner { gap: 28px; }
  .hero-name { font-size: 1.8rem; }
  .hero-photo { width: 140px; height: 170px; }
  .nav-links a { padding: 14px 8px; font-size: 0.78rem; }
  .card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .hero-photo { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ── DIVIDER ────────────────────────────────────────────────────── */
.divider {
  height: 3px;
  background: linear-gradient(to right, var(--maroon), var(--gold), transparent);
  margin: 48px 0;
  border: none;
}

/* ── PILL LINKS ─────────────────────────────────────────────────── */
.pill-link {
  display: inline-block;
  background: var(--maroon);
  color: var(--white) !important;
  text-decoration: none !important;
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.18s;
  margin-top: 12px;
}

.pill-link:hover { background: var(--maroon-dark) !important; }

/* ── APPLICATION FORM ───────────────────────────────────────────── */
.apply-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 32px;
  margin-top: 20px;
}

.apply-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .apply-form .form-row { grid-template-columns: 1fr; }
  .apply-form { padding: 20px 18px; }
}

.apply-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
}

.apply-form .form-group.full { grid-column: 1 / -1; }

.apply-form label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.apply-form label .req { color: var(--maroon); margin-left: 2px; }

.apply-form input[type="text"],
.apply-form input[type="email"],
.apply-form input[type="date"],
.apply-form select,
.apply-form textarea {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.18s, box-shadow 0.18s;
  width: 100%;
}

.apply-form input:focus,
.apply-form select:focus,
.apply-form textarea:focus {
  outline: none;
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(122,0,60,0.08);
}

.apply-form textarea { resize: vertical; min-height: 110px; }

.apply-form .radio-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.apply-form .radio-group label {
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.apply-form .radio-group input[type="radio"] { accent-color: var(--maroon); }

.apply-form .form-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.apply-form .funding-source { display: none; }
.apply-form .funding-source.visible { display: flex; }

.apply-form .submit-btn {
  background: var(--maroon);
  color: var(--white);
  border: none;
  padding: 11px 32px;
  border-radius: 5px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
  margin-top: 8px;
}

.apply-form .submit-btn:hover { background: var(--maroon-dark); }

.funding-note {
  background: #fff8f0;
  border: 1px solid #f5c87a;
  border-left: 4px solid var(--gold-dark);
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.65;
}

/* ── OPENINGS BOX ───────────────────────────────────────────────── */
.openings-box {
  background: #fff8f0;
  border: 1px solid #f5c87a;
  border-left: 4px solid var(--gold-dark);
  border-radius: 6px;
  padding: 24px 28px;
  margin-top: 32px;
}

.openings-box h3 {
  color: var(--maroon);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.openings-box ol {
  padding-left: 20px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.openings-box ol li { margin-bottom: 4px; }

.openings-box a { color: var(--maroon); }
