/* ===================================================
   karimharji.com — Shared Stylesheet
   Modern Professional · Cool Professional Tones
   =================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --navy:       #1a2744;
  --navy-light: #253559;
  --slate:      #475569;
  --slate-light:#94a3b8;
  --teal:       #0d9488;
  --teal-light: #14b8a6;
  --teal-pale:  #ccfbf1;
  --white:      #ffffff;
  --off-white:  #f8fafc;
  --border:     #e2e8f0;
  --text:       #1e293b;
  --text-light: #64748b;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --max-width:  1140px;
  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,.08);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.1);
  --transition: .25s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--teal-light); }

/* ---------- Utility ---------- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0; }
.section--alt { background: var(--off-white); }
.section--navy { background: var(--navy); color: var(--white); }
.section--navy a { color: var(--teal-light); }
.text-center { text-align: center; }
.text-light { color: var(--text-light); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-4 { margin-bottom: 32px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.3; color: var(--navy); }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--white); }
h1 { font-size: 2.5rem; letter-spacing: -0.02em; }
h2 { font-size: 1.75rem; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; font-family: var(--font-sans); font-weight: 600; }
p + p { margin-top: 12px; }

.page-subtitle {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 720px;
  margin: 10px auto 0;
}

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav__logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.nav__logo:hover { color: var(--navy); }
.nav__links { display: flex; gap: 32px; list-style: none; }
.nav__links a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--slate);
  position: relative;
  padding: 4px 0;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--teal);
  transition: width var(--transition);
}
.nav__links a:hover,
.nav__links a.active { color: var(--navy); }
.nav__links a:hover::after,
.nav__links a.active::after { width: 100%; }

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: var(--transition);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 56px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 50%, #1a4a5e 100%);
  z-index: -2;
}
.hero::after {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(13,148,136,.15) 0%, transparent 70%);
  z-index: -1;
}
.hero h1 { color: var(--white); font-size: 2.75rem; margin-bottom: 16px; }
.hero p { color: rgba(255,255,255,.85); font-size: 1.15rem; max-width: 660px; line-height: 1.8; }
.hero .container { position: relative; z-index: 1; }

/* Hero split layout (text left, photo right) */
.hero__split {
  display: flex;
  align-items: center;
  gap: 64px;
}
.hero__text { flex: 1; min-width: 0; }
.hero__photo { flex-shrink: 0; }
.hero__img {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,.15);
  box-shadow: 0 16px 48px rgba(0,0,0,.25);
}

/* Page hero (smaller) */
.hero--page { padding: 48px 0 36px; }
.hero--page h1 { font-size: 2.25rem; margin-bottom: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}
.btn--primary {
  background: var(--teal);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--teal-light);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(13,148,136,.3);
}
.btn--outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,.4);
}
.btn--outline:hover {
  border-color: var(--white);
  color: var(--white);
  background: rgba(255,255,255,.08);
}
.btn--outline-dark {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border);
}
.btn--outline-dark:hover {
  border-color: var(--teal);
  color: var(--teal);
}
.btn-group { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

/* Arrow icon in buttons */
.btn .arrow { transition: transform var(--transition); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: transparent;
  transform: translateY(-2px);
}
.card__label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}
.card h3 { margin-bottom: 12px; }
.card p { color: var(--text-light); font-size: .95rem; }
.card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--teal);
}
.card__link:hover { gap: 10px; }

/* Featured card (larger) */
.card--featured {
  border-left: 4px solid var(--teal);
  background: linear-gradient(135deg, var(--white) 0%, var(--off-white) 100%);
}

/* ---------- Grid ---------- */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Stat Banner ---------- */
.stats {
  display: flex;
  justify-content: center;
  gap: 64px;
  padding: 48px 0;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat__number {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
}
.stat__label {
  font-size: .85rem;
  color: rgba(255,255,255,.7);
  margin-top: 8px;
}

/* ---------- Client Logos ---------- */
.logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 40px 0;
  opacity: .6;
}
.logos span {
  font-size: .85rem;
  font-weight: 500;
  color: var(--slate-light);
  white-space: nowrap;
}

/* ---------- Timeline Dot ---------- */
.timeline-item {
  position: relative;
  padding-left: 32px;
  margin-bottom: 32px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-pale);
}
.timeline-item::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 24px;
  width: 2px;
  bottom: -20px;
  background: var(--border);
}
.timeline-item:last-child::after { display: none; }

/* ---------- Tags ---------- */
.tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 500;
  background: var(--teal-pale);
  color: var(--teal);
}

/* ---------- Divider ---------- */
.divider {
  width: 48px;
  height: 3px;
  background: var(--teal);
  border-radius: 2px;
  margin: 16px 0;
}
.divider--center { margin: 16px auto; }

/* ---------- Accordion ---------- */
.accordion { border-top: 1px solid var(--border); }
.accordion__item { border-bottom: 1px solid var(--border); }
.accordion__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}
.accordion__header:hover { color: var(--teal); }
.accordion__icon {
  font-size: 1.4rem;
  transition: transform var(--transition);
  color: var(--teal);
}
.accordion__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}
.accordion__body-inner { padding: 0 0 24px; }
.accordion__item.open .accordion__icon { transform: rotate(45deg); }

/* ---------- Footer ---------- */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,.7);
  padding: 20px 0 12px;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}
.footer__brand {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}
.footer__tagline {
  font-size: .9rem;
  max-width: 360px;
  line-height: 1.6;
}
.footer__links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer__links a { color: rgba(255,255,255,.7); font-size: .9rem; }
.footer__links a:hover { color: var(--teal-light); }
.footer__bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .8rem;
  text-align: center;
}

/* ---------- Contact Form ---------- */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: .95rem;
  color: var(--text);
  transition: border-color var(--transition);
  background: var(--white);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,148,136,.1);
}
.form-group textarea { resize: vertical; min-height: 140px; }

/* ---------- Page Anchor Nav (sticky jump-to) ---------- */
.page-nav {
  position: sticky;
  top: 64px;
  z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0;
  overflow-x: auto;
}
.page-nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 28px;
  white-space: nowrap;
}
.page-nav a {
  display: inline-block;
  padding: 12px 0;
  font-size: .82rem;
  font-weight: 600;
  color: var(--slate);
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.page-nav a:hover,
.page-nav a.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

/* ---------- Embed containers ---------- */
.embed-slot {
  background: var(--off-white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.embed-slot p { color: var(--text-light); font-size: .9rem; }
.embed-slot iframe {
  width: 100%;
  border: none;
  border-radius: var(--radius-sm);
}

/* ---------- Speaking table ---------- */
.speaking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.speaking-table th {
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal);
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
}
.speaking-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}
.speaking-table tr:hover td { background: var(--off-white); }
.speaking-table .year-cell {
  font-weight: 600;
  white-space: nowrap;
  color: var(--teal);
  font-size: 1rem;
  vertical-align: top;
  padding-top: 16px;
  border-bottom: none;
}

/* ---------- Scroll Animations ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .grid--4 { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 2.25rem; }
  .hero h1 { font-size: 2.5rem; }
  .stats { gap: 32px; }
}
@media (max-width: 640px) {
  .nav__links { display: none; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    gap: 16px;
    box-shadow: var(--shadow-md);
  }
  .nav__toggle { display: block; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 48px; }
  .hero h1 { font-size: 2rem; }
  .hero__split { flex-direction: column-reverse; gap: 32px; text-align: center; }
  .hero__img { width: 180px; height: 180px; }
  .hero__split .btn-group { justify-content: center; }
  .section { padding: 40px 0; }
  .footer__inner { flex-direction: column; }
  .stats { flex-direction: column; align-items: center; gap: 24px; }
  .btn-group { flex-direction: column; }
}

/* ---------- Print ---------- */
@media print {
  .nav, .footer, .page-nav, .btn-group, .btn, .hero::before, .hero::after { display: none !important; }
  body { font-size: 11pt; line-height: 1.5; color: #000; }
  .hero { background: none !important; padding: 24px 0 !important; }
  .hero h1, .hero p, .section--navy h2, .section--navy h3, .section--navy p { color: #000 !important; }
  .section--navy { background: #f5f5f5 !important; }
  .section { padding: 24px 0 !important; }
  .card { border: 1px solid #ccc; box-shadow: none; page-break-inside: avoid; }
  .fade-up { opacity: 1 !important; transform: none !important; }
  a { color: #000; text-decoration: underline; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #666; }
  .nav__logo::after, .footer a::after { content: none; }
}
