/* ==============================================
   drnagham.com — main stylesheet
   ============================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  zoom: 0.85;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #2d2d2d;
  background: #fff;
}

a {
  color: #2a7f7f;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Navigation ── */

nav {
  background: #1e3a5f;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.nav-brand {
  color: #fff;
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-decoration: none;
}

.nav-brand:hover {
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
}

.nav-links a {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 1.1rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  border-bottom-color: #2a7f7f;
  text-decoration: none;
}

/* ── Main layout ── */

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5rem 1.75rem 5rem;
}

/* ── Page header ── */

.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.75rem;
  /* border-bottom: 2px solid #dde2e8; */
  margin-left: -10rem;
  margin-right: -10rem;
  padding-left: 10rem;
  padding-right: 10rem;
}

.page-header h1 {
  font-size: 1.85rem;
  font-weight: 700;
  color: #1e3a5f;
  line-height: 1.2;
  margin-bottom: 0.3rem;
}

.page-header .position {
  font-size: 1.05rem;
  font-weight: 500;
  color: #4a6080;
  margin-bottom: 0.1rem;
}

.page-header .affiliation {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.75rem;
  line-height: 1.55;
}

.page-header .contact {
  font-size: 0.87rem;
  color: #777;
}

.page-header .contact a {
  color: #2a7f7f;
}

.bio-intro {
  margin-top: 1rem;
  font-size: 1.04rem;
  color: #3a3a3a;
  line-height: 1.72;
  margin-right: -3rem;
  text-align: justify;
  hyphens: none;
  word-spacing: -0.01em;
}

/* ── External profile logo links ── */

.logo-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: -3rem;
  flex-wrap: wrap;
}

.logo-links a {
  display: inline-flex;
  align-items: center;
  opacity: 0.82;
  transition: opacity 0.15s;
  text-decoration: none;
}

.logo-links a:hover {
  opacity: 1;
  text-decoration: none;
}

.logo-links .logo-orcid {
  height: 48px;
  width: auto;
}

.logo-links .logo-google_scholar {
  height: 48px;
  width: auto;
}

.logo-links .logo-uitm {
  height: 48px;
  width: auto;
}

/* ── Profile photo layout ── */

.header-layout {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.profile-photo {
  flex-shrink: 0;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #2a7f7f;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.13);
  margin-left: -10rem;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.3) rotate(-3deg) translateX(-1.5%) translateY(0%);
  display: block;
}

.header-text {
  flex: 1;
  min-width: 0;
}

/* ── Sections ── */

section {
  margin-bottom: 2.25rem;
}

section h2 {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #1e3a5f;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1.5px solid #dde2e8;
}

section h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e3a5f;
  margin: 1.5rem 0 0.65rem;
  padding-left: 0.65rem;
  border-left: 3px solid #2a7f7f;
}

/* ── Plain dash list ── */

ul.plain {
  list-style: none;
  padding: 0;
}

ul.plain li {
  padding: 0.25rem 0 0.25rem 1.2rem;
  position: relative;
  font-size: 0.92rem;
}

ul.plain li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #2a7f7f;
}

/* ── Two-column bullet list ── */

ul.bullet {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem 1rem;
}

ul.bullet li {
  padding: 0.2rem 0 0.2rem 1.2rem;
  position: relative;
  font-size: 0.92rem;
}

ul.bullet li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: #2a7f7f;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
}

/* ── Tables ── */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 420px;
}

thead th {
  background: #1e3a5f;
  color: #fff;
  font-weight: 600;
  text-align: left;
  padding: 0.55rem 0.8rem;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

tbody td {
  padding: 0.5rem 0.8rem;
  vertical-align: top;
  border-bottom: 1px solid #e8ecf0;
  line-height: 1.5;
}

tbody tr:nth-child(even) td {
  background: #f5f7fa;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ── Publication numbered list ── */

ol.pub-list {
  padding-left: 2rem;
  margin-top: 0.25rem;
}

ol.pub-list li {
  font-size: 0.89rem;
  line-height: 1.62;
  padding: 0.5rem 0 0.5rem 0.3rem;
  border-bottom: 1px solid #f0f2f5;
  color: #333;
}

ol.pub-list li:last-child {
  border-bottom: none;
}

ol.pub-list em {
  font-style: italic;
  color: #444;
}

/* ── Prose text (philosophy, goals) ── */

.prose p {
  font-size: 0.93rem;
  color: #3a3a3a;
  margin-bottom: 0.85rem;
  line-height: 1.72;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* ── Highlight box ── */

.highlight-box {
  background: #f0f6f6;
  border-left: 4px solid #2a7f7f;
  padding: 1rem 1.25rem;
  border-radius: 0 4px 4px 0;
  font-size: 0.9rem;
  color: #2d4a4a;
  line-height: 1.65;
}

/* ── Contact block (About page) ── */

.contact-block {
  background: #f5f7fa;
  border-left: 4px solid #1e3a5f;
  border-radius: 0 4px 4px 0;
  padding: 1.1rem 1.25rem;
}

.contact-address {
  font-size: 0.88rem;
  color: #4a6080;
  line-height: 1.6;
}

.contact-email {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid #dde2e8;
  font-size: 0.92rem;
  font-weight: 500;
}

/* ── CV download block (About page) ── */

.cv-block {
  margin: 0;
}

.cv-download {
  display: inline-block;
  border: 1px solid #1e3a5f;
  border-radius: 3px;
  background: #c07af1;
  color: #1e3a5f;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.55rem 1.15rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.cv-download:hover,
.cv-download:focus {
  background: #8443b2;
  color: #fff;
}

/* ── Footer ── */

footer {
  border-top: 1px solid #eee;
  margin-top: 2rem;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: #bbb;
}

/* ── Responsive ── */

@media (max-width: 1000px) {
  .page-header {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .bio-intro {
    margin-right: 0;
  }

  .profile-photo {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  nav {
    flex-direction: column;
    height: auto;
    padding: 0.65rem 1rem;
    gap: 0.25rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links a {
    height: auto;
    padding: 0.3rem 0.65rem;
    border-bottom: none;
    font-size: 0.83rem;
  }

  .nav-links a.active {
    color: #fff;
    background: rgba(42, 127, 127, 0.35);
    border-radius: 3px;
  }

  .header-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-photo {
    width: 130px;
    height: 130px;
  }

  .page-header h1 {
    font-size: 1.4rem;
  }

  main {
    padding: 1.5rem 1rem 3rem;
  }

  ul.bullet {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 0.8rem;
  }

  thead th,
  tbody td {
    padding: 0.4rem 0.55rem;
  }
}