/* =========================================================
   Global Style for Dr. Mohan Mallick Academic Website
   ========================================================= */

:root {
  --page-bg: #f7f5f0;
  --card-bg: #ffffff;
  --text-main: #222222;
  --text-muted: #555555;
  --link-color: #6f3f1f;
  --link-hover: #9a5a2a;
  --border-light: #e6e1d8;
  --table-bg: #faf8f3;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

/* =========================================================
   Main Container
   ========================================================= */

.container {
  max-width: 980px;
  margin: 2rem auto;
  padding: 2rem 2.5rem;
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

/* =========================================================
   Header and Navigation
   Works for both:
   <header> ... </header>
   and
   <header class="topbar"> ... </header>
   ========================================================= */

header,
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}

.site-title {
  margin: 0;
}

.site-title h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.site-title a {
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-main);
  white-space: nowrap;
}

.site-title a:hover {
  color: var(--link-color);
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.85rem;
}

nav a {
  text-decoration: none;
  color: #333333;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding-bottom: 2px;
}

nav a:hover,
nav a.active {
  color: var(--link-color);
  border-bottom: 1px solid var(--link-color);
}

/* =========================================================
   General Page Typography
   ========================================================= */

main {
  min-height: 60vh;
}

h1,
h2,
h3 {
  color: var(--text-main);
  line-height: 1.3;
}

h1 {
  font-size: 2rem;
  margin-top: 0;
}

h2 {
  font-size: 1.55rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

h3 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--link-color);
}

a:hover {
  color: var(--link-hover);
}

strong {
  font-weight: 600;
}
/* =========================================================
   Home Page Hero Section
   ========================================================= */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.hero-text {
    flex: 1;
}

.hero-text h2 {
    margin-top: 0;
    font-size: 2rem;
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
}

.research-line {
    line-height: 1.6;
}

.hero-photo img {
    width: 230px;
    max-width: 100%;
    border-radius: 8px;
    display: block;
}

/* Mobile Responsiveness for Hero */
@media (max-width: 700px) {
    .hero {
        flex-direction: column-reverse;
        align-items: flex-start;
    }
    .hero-photo img {
        width: 180px;
    }
}

/* =========================================================
   Lists
   ========================================================= */

ul,
ol {
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.35rem;
}

/* =========================================================
   Tables
   Useful for Teaching page and CV-style tables
   ========================================================= */

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 1rem 0 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1rem 0;
}

th,
td {
  border: 1px solid var(--border-light);
  padding: 0.65rem 0.75rem;
  vertical-align: top;
}

th {
  background: var(--table-bg);
  font-weight: 600;
  text-align: left;
}

tr:nth-child(even) td {
  background: #fcfbf8;
}

/* =========================================================
   Buttons and Download Links
   ========================================================= */

.button,
.btn,
.download-button,
a.button,
a.btn,
a.download-button {
  display: inline-block;
  padding: 0.65rem 1rem;
  margin: 0.5rem 0 1rem 0;
  background: var(--link-color);
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
}

.button:hover,
.btn:hover,
.download-button:hover,
a.button:hover,
a.btn:hover,
a.download-button:hover {
  background: var(--link-hover);
  color: #ffffff;
}

/* =========================================================
   Publication / Project Style Helpers
   ========================================================= */

.publication-list li,
.project-list li {
  margin-bottom: 0.8rem;
}

.project-card,
.info-card {
  background: #fcfbf8;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin: 1rem 0 1.5rem 0;
}

/* =========================================================
   Footer
   ========================================================= */

footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* =========================================================
   Responsive Design
   ========================================================= */

@media (max-width: 750px) {
  body {
    background: #ffffff;
  }

  .container {
    margin: 0;
    padding: 1.2rem;
    border-radius: 0;
    box-shadow: none;
  }

  header,
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .site-title h1,
  .site-title a {
    font-size: 1.2rem;
  }

  nav {
    justify-content: flex-start;
    gap: 0.7rem;
  }

  nav a {
    font-size: 0.88rem;
  }

  h1 {
    font-size: 1.7rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  table {
    font-size: 0.88rem;
  }
}

