/* /styles.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #fdfdfd;
  --text: #222;
  --muted: #555;

  --header-bg: #222;
  --header-border: #444;

  --card-bg: #f5f5f5;
  --link: #1e90ff;

  --container: 960px;
  --gutter: 1rem;

  --radius: 10px;
  --shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
  max-width: 100%;
  overflow-x: hidden;

  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

p {
  max-width: 70ch;
}

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

a:hover {
  text-decoration: underline;
}

/* =======================
   HEADER & NAVIGATION
   (content flush to screen edges)
======================= */
.site-header {
  background: var(--header-bg);
  color: #fff;
  border-bottom: 1px solid var(--header-border);
}

.site-header-inner {
  width: 100%;
  padding: 0.75rem 2rem;

  display: flex;
  align-items: center;
  gap: 1rem;

  flex-wrap: nowrap;
}

.site-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 0 0 auto;
  min-width: 0;
}

.site-title {
  font-size: 1.35rem;
  margin: 0;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

/* Header title link should look like plain white text */
.site-header .site-title .site-title-link,
.site-header .site-title .site-title-link:visited {
  color: #fff;
  text-decoration: none;
}

.site-header .site-title .site-title-link:hover,
.site-header .site-title .site-title-link:focus-visible {
  color: #fff;
  text-decoration: none;
  opacity: 0.9;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-icons a {
  color: #fff;
  font-size: 1.2rem;
  transition: color 0.2s ease;
  text-decoration: none;
}

.header-icons a:hover {
  color: var(--link);
  text-decoration: none;
}

.site-header nav {
  margin-left: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;

  justify-content: flex-end;
  align-items: center;
  white-space: nowrap;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.nav-links a:hover {
  border-bottom: 2px solid #999;
  text-decoration: none;
}

.nav-links a.active {
  border-bottom: 2px solid var(--link);
}

/* =======================
   GENERAL LAYOUT
   (main content centered)
======================= */
section {
  max-width: var(--container);
  margin: 2rem auto;
  padding: 0 var(--gutter);
}

/* =======================
   ABOUT SECTION (homepage)
   Side-by-side on laptop/desktop
======================= */
.about-container {
  display: grid;
  grid-template-columns: 290px 1fr; /* ~20% smaller than 360px */
  gap: 2rem;
  margin-top: 1.25rem;
  align-items: start;
}

.profile-pic {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

.about-text {
  min-width: 0;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--muted);
}

/* Stack on smaller screens */
@media (max-width: 820px) {
  .about-container {
    grid-template-columns: 1fr;
  }

  .profile-pic {
    max-width: 420px;
  }
}


/* =======================
   PROJECTS / CARDS
======================= */
.project-card,
.research-paper {
  background: var(--card-bg);
  padding: 1.5rem;
  margin-top: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.research-paper h3 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.research-paper .paper-link {
  display: inline-block;
  margin-bottom: 0.9rem;
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
}

.research-paper .paper-link:hover {
  text-decoration: underline;
}

.research-paper .abstract {
  line-height: 1.65;
  font-size: 1rem;
  color: var(--muted);
}

.project-authors {
  margin: 0.25rem 0 0.75rem 0;
  color: var(--muted);
  line-height: 1.5;
}

.section-break {
  margin-top: 3rem;
}

#projects .section-break + .project-card {
  margin-top: 1.75rem;
}

/* =======================
   FOOTER (match header)
   (content flush to screen edges)
======================= */
.site-footer {
  margin-top: 2rem;
  background: var(--header-bg);
  color: #fff;
  border-top: 1px solid var(--header-border);
}

.site-footer-inner {
  width: 100%;
  padding: 0.75rem 2rem;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.footer-divider {
  opacity: 0.7;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.footer-links a:hover {
  border-bottom: 2px solid #999;
  color: #fff;
}

/* =======================
   RESPONSIVE HEADER/FOOTER
======================= */
@media (max-width: 640px) {
  .site-header-inner,
  .site-footer-inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .site-header-inner {
    flex-wrap: wrap;
    row-gap: 0.6rem;
  }

  .site-header nav {
    width: 100%;
    margin-left: 0;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    gap: 1rem;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
