/* ==========================================================================
   Academic website — Meghana Gaur
   Minimal, professional stylesheet. Adjust the variables below to re-theme.
   ========================================================================== */

:root {
  --accent: #E77500;        /* Princeton orange; change to taste */
  --accent-dark: #b35c00;
  --text: #1f2428;
  --text-muted: #5c6670;
  --rule: #e3e6e8;
  --bg: #ffffff;
  --max-width: 46rem;
  --font-body: Helvetica, Arial, sans-serif;        /* body text & headings */
  --font-ui: Helvetica, Arial, sans-serif;          /* nav, labels, footer */
}

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

html { font-size: 17px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Header / navigation ------------------------------------------------ */

header {
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 0 1rem;
}

header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

/* Works both as a plain link (inner pages) and as an <h1> wrapping a link
   (homepage), rendering identically in either case. */
.site-name {
  font-size: 1.35rem;
  font-weight: bold;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
  margin: 0;
}

.site-name a {
  color: inherit;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1.25rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding-bottom: 2px;
}

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

nav a.active {
  color: var(--accent-dark);
  border-bottom: 2px solid var(--accent);
}

/* --- Main content ------------------------------------------------------- */

main { padding: 2.5rem 0 3rem; }

h1 { font-size: 1.75rem; margin-bottom: 1rem; }

/* Centered page title (e.g. "Research" on the research page). */
.page-title { text-align: center; }

h2 {
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--rule);
}

/* When a section heading is the first thing on a page (no page title above it),
   drop its top margin so content starts at the same height on every page. */
main .container > h2:first-child { margin-top: 0; }

p { margin-bottom: 1rem; }

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

ul { margin: 0 0 1rem 1.25rem; }
li { margin-bottom: 0.35rem; }

.muted { color: var(--text-muted); }

/* --- Home page intro (photo + bio) -------------------------------------- */

.intro {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

.intro .bio { flex: 1 1 24rem; }

/* On wide screens, let the photo hang into the left gutter so the bio
   keeps a wider column while its right edge stays aligned with the page. */
@media (min-width: 54rem) {
  .intro { margin-left: -3.5rem; }
}

.headshot {
  width: 14rem;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 50% 75%;
  border-radius: 50%;
  flex: 0 0 auto;
}

.headshot-placeholder {
  width: 12rem;
  height: 15rem;
  border: 1px dashed var(--rule);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
}

.contact-list {
  list-style: none;
  margin-left: 0;
  font-size: 0.95rem;
}

/* Inline icons next to links (LinkedIn, GitHub, etc.).
   The icon inherits the link's color via fill: currentColor. */
.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

.icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  fill: currentColor;
}

/* For outline-style icons (e.g. the email envelope) drawn with strokes. */
.icon--stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* --- Research page ------------------------------------------------------ */

.paper { margin-bottom: 1.75rem; }

.paper-title { font-weight: bold; }

.paper-meta {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.paper-links {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.paper-links a { margin-right: 0.75rem; }

/* A link-styled placeholder with no destination (e.g. "[Draft Coming Soon]"). */
.paper-links a.no-link {
  color: var(--accent-dark);
  cursor: default;
}

/* "Abstract" toggle button, shown next to the paper links. */
.show-abstract {
  background: #f6f1ea;
  color: var(--text);
  border: none;
  border-radius: 3px;
  padding: 0.25rem 0.6rem;
  margin-right: 0.5rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-style: italic;
}

.show-abstract:hover { background: #efe6da; }

/* Abstract text: hidden until the button adds the .visible class. */
.abstract {
  display: none;
  margin: 0.5rem 0 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  text-align: justify;
  text-wrap: pretty;  /* avoids a lone word on the last line in supporting browsers */
}

.abstract.visible { display: block; }

/* --- Footer -------------------------------------------------------------- */

footer {
  border-top: 1px solid var(--rule);
  padding: 1.25rem 0 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-ui);
}

/* --- Small screens -------------------------------------------------------- */

@media (max-width: 600px) {
  html { font-size: 16px; }
  header .container { flex-direction: column; }
  nav { flex-wrap: wrap; gap: 0.75rem 1rem; }
  .abstract { text-align: left; }
}
