/* =============================================
   Dr. Paul Chummar CMI – Academic Website
   Modern CSS rewrite (replacing table-based layout)
   ============================================= */

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

:root {
  --navy:      #1a3a5c;
  --navy-dark: #122841;
  --navy-mid:  #2c5f8a;
  --accent:    #c8a84b;
  --sidebar-bg:#f0f4f8;
  --border:    #d0dce8;
  --text:      #2d2d2d;
  --text-light:#555;
  --white:     #ffffff;
  --font:      'Segoe UI', Arial, Helvetica, sans-serif;
}

html { font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: #e8edf2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ───────────────────────────────── */

header {
  background: var(--navy);
  color: var(--white);
  padding: 28px 36px 22px;
  border-bottom: 4px solid var(--accent);
}

header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

header .subtitle {
  font-size: 0.92rem;
  color: #a8c4df;
  margin-top: 5px;
  font-style: italic;
}

/* ── Page layout ──────────────────────────── */

.layout {
  display: flex;
  flex: 1;
  align-items: stretch;
}

/* ── Sidebar nav ──────────────────────────── */

.sidebar {
  width: 200px;
  min-width: 200px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 24px 0;
}

.sidebar ul {
  list-style: none;
}

.sidebar ul li a {
  display: block;
  padding: 10px 20px;
  color: var(--navy);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.sidebar ul li a:hover {
  background: #dce6f0;
  border-left-color: var(--navy-mid);
  color: var(--navy-dark);
}

.sidebar ul li a.active {
  background: var(--white);
  border-left-color: var(--accent);
  color: var(--navy-dark);
  font-weight: 700;
}

/* ── Main content ─────────────────────────── */

main {
  flex: 1;
  background: var(--white);
  padding: 36px 44px;
  max-width: 860px;
}

main h2 {
  font-size: 1.25rem;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
  margin-bottom: 24px;
}

main h3 {
  font-size: 1rem;
  color: var(--navy-mid);
  margin: 20px 0 8px;
  font-weight: 600;
}

main p {
  line-height: 1.75;
  margin-bottom: 16px;
  color: var(--text);
}

/* ── Ordered / numbered content lists ──────── */

.item-list {
  list-style: none;
  counter-reset: item-counter;
}

.item-list li {
  counter-increment: item-counter;
  padding: 10px 0 10px 44px;
  position: relative;
  border-bottom: 1px solid #eef1f5;
  line-height: 1.65;
  font-size: 0.95rem;
}

.item-list li::before {
  content: counter(item-counter);
  position: absolute;
  left: 0;
  top: 10px;
  width: 28px;
  height: 28px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* ── Education timeline ───────────────────── */

.timeline {
  list-style: none;
  border-left: 3px solid var(--border);
  padding-left: 24px;
  margin-top: 8px;
}

.timeline li {
  position: relative;
  padding: 10px 0 16px;
  line-height: 1.65;
  font-size: 0.95rem;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -31px;
  top: 14px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border: 2px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--navy-mid);
}

.timeline li .year {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--navy);
  color: var(--white);
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

/* ── Welcome page photo ───────────────────── */

.welcome-photo {
  display: block;
  max-width: 280px;
  margin: 0 auto 24px;
  border: 4px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 4px 18px rgba(26,58,92,0.15);
}

.welcome-intro {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 600px;
}

/* ── Contact details ──────────────────────── */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 8px;
}

.contact-card {
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px 20px;
}

.contact-card h3 {
  margin-top: 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy);
  margin-bottom: 10px;
}

.contact-card p,
.contact-card a {
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--text);
  text-decoration: none;
}

.contact-card a {
  color: var(--navy-mid);
}

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

/* ── Research themes ──────────────────────── */

.theme-card {
  background: var(--sidebar-bg);
  border-left: 4px solid var(--navy-mid);
  border-radius: 0 6px 6px 0;
  padding: 18px 22px;
  margin-bottom: 24px;
}

.theme-card h3 {
  margin-top: 0;
  color: var(--navy);
  font-size: 1rem;
}

.theme-card p {
  font-size: 0.94rem;
  margin-bottom: 0;
}

/* ── Links ────────────────────────────────── */

a {
  color: var(--navy-mid);
}

a:hover {
  color: var(--navy-dark);
}

/* ── Note / disclaimer ────────────────────── */

.note {
  font-size: 0.82rem;
  color: #888;
  font-style: italic;
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ── Footer ───────────────────────────────── */

footer {
  background: var(--navy-dark);
  color: #7a9ab8;
  text-align: center;
  padding: 14px 20px;
  font-size: 0.82rem;
}

footer a {
  color: #a8c4df;
}

/* ── Responsive ───────────────────────────── */

@media (max-width: 700px) {
  .layout { flex-direction: column; }

  .sidebar {
    width: 100%;
    min-width: unset;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
  }

  .sidebar ul {
    display: flex;
    flex-wrap: wrap;
  }

  .sidebar ul li a {
    border-left: none;
    border-bottom: 3px solid transparent;
    padding: 8px 14px;
  }

  .sidebar ul li a.active {
    border-bottom-color: var(--accent);
  }

  main {
    padding: 24px 20px;
    max-width: 100%;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  header { padding: 20px; }
  header h1 { font-size: 1.35rem; }
}
