/* =========================
   Color variables
   ========================= */
:root {
  --bg: #f5fbff;
  --card: #f8fcff;
  --blue: #6ea8dc;
  --blue-dark: #365f95;
  --blue-light: #9fc7eb;
  --text: #2f3a45;
  --muted: #6d7b88;
  --border: #8fbfe8;
}

/* =========================
   Global reset / base
   ========================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* =========================
   Top navigation
   ========================= */
.topbar {
  padding: 26px 40px 8px;
}

.nav {
  display: flex;
  justify-content: flex-end;
  gap: 28px;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  color: var(--blue);
  font-size: 15px;
  font-weight: 700;
}

.nav a:hover {
  text-decoration: underline;
}

/* =========================
   Main page layout
   ========================= */
.page {
  width: min(1100px, 92%);
  margin: 0 auto 80px;
}

.page-title-block {
  text-align: center;
  margin: 48px 0 36px;
}

.page-title-block h1 {
  font-size: 58px;
  color: var(--blue);
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
}

.page-title-block p {
  margin: 0;
  color: var(--blue-light);
  font-weight: 600;
}

/* =========================
   Home page
   ========================= */
.home-hero {
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 40px;
  padding-bottom: 40px;
}

.home-center {
  text-align: center;
  max-width: 800px;
}

.home-name {
  margin: 0;
  font-size: 78px;
  color: var(--blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.home-name-line {
  width: 72px;
  height: 4px;
  background: var(--blue-light);
  margin: 18px auto 24px;
  border-radius: 999px;
}

.home-major {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
  color: #6a97c7;
}

.home-thread {
  margin: 0 0 12px;
  font-size: 21px;
  font-weight: 600;
  color: #8fbfe8;
  letter-spacing: 0.3px;
}

.home-school {
  font-size: 50px;
  font-weight: 800;
  color: var(--blue);
  -webkit-text-stroke: 1px var(--blue-dark);
}

/* =========================
   General content sections
   ========================= */
.content-section {
  margin: 56px 0;
}

.content-section:first-of-type {
  margin-top: 30px;
}

.two-col {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: start;
}

.section-label {
  font-size: 38px;
  font-weight: 800;
  color: #1f3550;
  background: #d9ecfb;
  display: inline-block;
  padding: 6px 14px;
  line-height: 1.1;
}

.section-content {
  font-size: 18px;
}

.section-content p {
  margin-top: 0;
  margin-bottom: 18px;
}

/* =========================
   Projects page
   ========================= */

/* 
  Two-column project card layout.
  Closed cards stay in a 2-column grid on desktop.
*/
.project-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 26px;
  max-width: 980px;
  margin: 0 auto;
  align-items: start;
}

/* Individual project card */
.project-box {
  background: #f9fcff;
  border: 3px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 6px 16px rgba(110, 168, 220, 0.12);
  overflow: hidden;
  align-self: start;
}

/* Clickable project header */
.project-box-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 22px 18px;
  cursor: pointer;
}

.project-box-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
}

.project-box-date {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-light);
}

/* Plus / minus icon on the right */
.project-box-plus {
  font-size: 30px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
  flex-shrink: 0;
}

/* 
  Project content is hidden by default.
  It appears only when the project card has the .open class.
*/
.project-box-body {
  display: none;
  padding: 0 22px 22px;
  border-top: 1px solid #dceaf7;
  font-size: 16px;
  line-height: 1.75;
}

/* Show body when opened */
.project-box.open .project-box-body {
  display: block;
}

/* 
  IMPORTANT:
  When a project opens, make it span the entire row.
  This must be OUTSIDE the media query so it also works on desktop.
*/
.project-box.open {
  grid-column: 1 / -1;
}

/* Headings inside expanded project body */
.project-box-body h3 {
  margin-top: 18px;
  margin-bottom: 8px;
  color: #1f3550;
  font-size: 18px;
}

/* Lists inside project body */
.project-box-body ul {
  margin-top: 0;
  padding-left: 20px;
}

/* Links inside project body */
.project-box-body a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
}

.project-box-body a:hover {
  text-decoration: underline;
}

/* =========================
   Project image section
   ========================= */

/* 
  Image grid inside each expanded project.
  auto-fit makes the layout more flexible than fixed 2 columns.
*/
.project-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 10px;
}

.project-figure {
  margin: 0;
}

/* Clickable report images */
.project-image {
  width: 100%;
  display: block;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: white;
  cursor: pointer;
}

/* Image caption */
.project-figure figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* =========================
   Resume page
   ========================= */
.resume-wrap {
  max-width: 900px;
  margin: 0 auto;
}

.resume-frame {
  width: 100%;
  height: 900px;
  border: none;
  background: white;
}

.resume-download {
  text-align: center;
  margin-top: 18px;
}

.resume-download a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.resume-download a:hover {
  text-decoration: underline;
}

/* =========================
   Contact page
   ========================= */
.contact-page {
  text-align: center;
}

.contact-photo {
  width: 215px;
  height: 215px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #6ea8dc;
  display: block;
  margin: 10px auto 25px auto;
}

.contact-icons {
  display: flex;
  justify-content: center;
  gap: 28px;
  font-size: 42px;
}

.contact-icons a {
  color: var(--blue);
  transition: transform 0.15s ease;
}

.contact-icons a:hover {
  transform: translateY(-2px);
}

/* =========================
   Image popup modal
   ========================= */

/* Full-screen dark overlay */
.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Show modal when JS adds .show */
.image-modal.show {
  display: flex;
}

/* Enlarged image */
.image-modal-content {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Close button */
.image-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 42px;
  color: white;
  cursor: pointer;
  line-height: 1;
}

/* =========================
   Responsive layout
   ========================= */
@media (max-width: 800px) {
  .home-name {
    font-size: 52px;
  }

  .home-major {
    font-size: 22px;
  }

  .home-thread {
    font-size: 18px;
  }

  .home-school {
    font-size: 36px;
  }

  .home-hero {
    min-height: 62vh;
  }

  /* On mobile, projects naturally become one column */
  .project-card-grid {
    grid-template-columns: 1fr;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .section-label {
    font-size: 30px;
  }

  .page-title-block h1 {
    font-size: 42px;
  }

  /* On small screens, image grid becomes one column */
  .project-image-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================
   equation layout
   ========================= */

/*.equation-block {
  margin-top: 14px;
  padding: 12px 16px;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: Georgia, serif;
  font-size: 16px;
}*/


.equation-box {
  margin: 16px 0;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
}

.equation-box img {
  max-width: 100%;
  height: auto;
}

/* =========================
   image pop
   ========================= */



.project-img {
  width: 100%;
  max-width: 850px;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 8px;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.project-img:hover {
  transform: scale(1.02);
}
.project-link {
  display: inline-block;
  padding: 10px 18px;
  background: #2563eb;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  margin: 10px 0;
}

.project-link:hover {
  background: #1d4ed8;
}
//Debugging RED

.debug-heading {
  color: #b42318;
  font-weight: 700;
}
