/* ============================================================
   menakahampole.github.io — style.css
   Design modeled after stefanogiglio.org
   ============================================================ */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: #2d3748;
  background: #fff;
  display: flex;
  min-height: 100vh;
}

/* === Sidebar === */
.sidebar {
  width: 280px;
  min-width: 280px;
  background: #002856;
  color: #e8eef6;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header {
  padding: 2.5rem 1.75rem 1.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h1 {
  font-family: 'Source Serif 4', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 0.6rem;
}

.sidebar-header .position {
  font-size: 0.8rem;
  color: #c49a52;
  font-weight: 400;
  line-height: 1.5;
}

nav {
  flex: 1;
  padding: 1.25rem 0;
}

nav ul { list-style: none; }

nav ul li a {
  display: block;
  padding: 0.6rem 1.75rem;
  color: #c8d8e8;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 400;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

nav ul li a:hover,
nav ul li a.active {
  color: #fff;
  background: rgba(196, 154, 82, 0.15);
  border-left-color: #c49a52;
}

.sidebar-footer {
  padding: 1.5rem 1.75rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.78rem;
  color: #a0b4c8;
  line-height: 1.7;
}

.sidebar-footer a {
  color: #c49a52;
  text-decoration: none;
}

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

/* === Main content === */
.main-content {
  margin-left: 280px;
  flex: 1;
  max-width: 820px;
  padding: 3.5rem 4rem;
}

/* === Sections === */
.section { display: none; animation: fadeIn 0.35s ease; }
.section.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Home === */
.home-header {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.profile-photo {
  width: 225px;
  min-width: 225px;
  height: 280px;
  object-fit: cover;
  object-position: top;
  filter: grayscale(15%);
  border-radius: 2px;
}

.profile-photo-placeholder {
  width: 195px;
  min-width: 195px;
  height: 245px;
  background: #e8f0f8;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4a7fb5;
  font-size: 0.78rem;
  text-align: center;
  padding: 1rem;
  border: 2px dashed #c8daea;
}

.profile-text h2 {
  font-family: 'Source Serif 4', serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: #002856;
  margin-bottom: 0.3rem;
}

.profile-text .role {
  color: #4a7fb5;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1.1rem;
}

.profile-text p {
  margin-bottom: 0.85rem;
  color: #4a5568;
  font-size: 0.95rem;
}

.affiliations {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.affil-badge {
  display: inline-block;
  background: #e8f0f8;
  color: #002856;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  letter-spacing: 0.03em;
}

.profile-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1.5px solid #4a7fb5;
  color: #4a7fb5;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 3px;
  transition: all 0.2s;
}

.btn:hover { background: #4a7fb5; color: #fff; }

.btn-accent { border-color: #c49a52; color: #c49a52; }
.btn-accent:hover { background: #c49a52; color: #fff; }

/* === Section headings === */
h2.section-title {
  font-family: 'Source Serif 4', serif;
  font-size: 1.4rem;
  color: #002856;
  border-bottom: 2px solid #e8f0f8;
  padding-bottom: 0.5rem;
  margin-bottom: 1.75rem;
  margin-top: 2.25rem;
}

h2.section-title:first-child { margin-top: 0; }

/* === Paper list === */
.paper-list { list-style: none; }

.paper-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid #e8f0f8;
}

.paper-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.paper-num {
  font-family: 'Source Serif 4', serif;
  font-size: 1.05rem;
  color: #4a7fb5;
  font-weight: 600;
  min-width: 1.75rem;
  padding-top: 0.1rem;
}

.paper-title {
  font-weight: 600;
  color: #1a202c;
  font-size: 0.97rem;
  margin-bottom: 0.2rem;
  line-height: 1.45;
}

.paper-authors {
  color: #718096;
  font-size: 0.86rem;
  margin-bottom: 0.2rem;
}

.paper-authors em { font-style: normal; font-weight: 600; color: #4a5568; }

.paper-journal {
  color: #4a7fb5;
  font-size: 0.86rem;
  margin-bottom: 0.4rem;
}

.paper-awards { margin-bottom: 0.45rem; }

.paper-award {
  display: inline-block;
  background: rgba(196,154,82,0.15);
  color: #7a5c20;
  border: 1px solid rgba(196,154,82,0.4);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.12rem 0.5rem;
  border-radius: 3px;
  margin-right: 0.3rem;
  margin-bottom: 0.25rem;
}

.paper-links {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  align-items: center;
}

.paper-links a,
.abstract-toggle {
  color: #4a7fb5;
  text-decoration: none;
  font-size: 0.8rem;
  border: 1px solid #c8daea;
  padding: 0.12rem 0.55rem;
  border-radius: 3px;
  transition: all 0.2s;
  background: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.5;
}

.paper-links a:hover,
.abstract-toggle:hover {
  background: #4a7fb5;
  color: #fff;
  border-color: #4a7fb5;
}

.abstract-text {
  display: none;
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  background: #f4f8fc;
  border-left: 3px solid #c49a52;
  font-size: 0.86rem;
  color: #4a5568;
  line-height: 1.7;
  border-radius: 0 3px 3px 0;
}

.abstract-text.open { display: block; }

/* === Teaching === */
.course-group { margin-bottom: 2rem; }

.course-group h3 {
  font-family: 'Source Serif 4', serif;
  color: #002856;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.course-list { list-style: none; }

.course-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid #e8f0f8;
  font-size: 0.9rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

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

.course-code {
  color: #4a7fb5;
  font-weight: 600;
  min-width: 5.5rem;
  font-size: 0.82rem;
}

/* === Contact === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 0.25rem;
}

.contact-card {
  background: #f4f8fc;
  border-left: 3px solid #c49a52;
  padding: 1.25rem 1.5rem;
  border-radius: 0 4px 4px 0;
}

.contact-card h3 {
  font-family: 'Source Serif 4', serif;
  color: #002856;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
}

.contact-card p,
.contact-card a {
  font-size: 0.88rem;
  color: #4a5568;
  line-height: 1.75;
  text-decoration: none;
}

.contact-card a { color: #4a7fb5; }
.contact-card a:hover { text-decoration: underline; }
.contact-card .spacer { margin-top: 0.9rem; }

/* === Mobile header === */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  background: #002856;
  z-index: 200;
  align-items: center;
  padding: 0 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.mobile-header h1 {
  font-family: 'Source Serif 4', serif;
  font-size: 0.97rem;
  color: #fff;
  font-weight: 600;
}

.hamburger {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.25s;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 99;
}

.overlay.active { display: block; }

/* === Responsive === */
@media (max-width: 900px) {
  .mobile-header { display: flex; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open { transform: translateX(0); }

  .main-content {
    margin-left: 0;
    padding: 4.75rem 1.5rem 2.5rem;
    max-width: 100%;
  }
}

@media (max-width: 580px) {
  .home-header { flex-direction: column; align-items: center; text-align: center; }
  .profile-links { justify-content: center; }
  .affiliations { justify-content: center; }
  .contact-grid { grid-template-columns: 1fr; }
  .profile-photo, .profile-photo-placeholder { width: 160px; min-width: 160px; height: 200px; }
}
