/* ====== Reset + fonts ====== */
*,
*::before,
*::after { box-sizing: border-box; }

@font-face {
  font-family: "JetBrains Sans";
  src: url("fonts/JetBrainsSans-Regular.woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Regular.woff2");
}

/* Root / theme */
:root {
  --fg: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.7);
  --accent: #00d4ff;
  --header-h: 84px; /* fallback; JS can set real height */
  font-family: "JetBrains Sans", Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  font-weight: 300;
  color: var(--fg);
  background-color: #000;
}

/* ====== VIDEO - only visible on home pages ======
   This makes the video appear behind everything only when body has .home-page
*/
body.home-page #bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

/* If a page doesn't include the video element, nothing is shown; safe for multi-page setup */

/* ====== Header / Hero banner (shared across pages) ====== */
.hero-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 18px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.36);
  backdrop-filter: blur(8px);
  z-index: 1000;
}

/* logo */
.hero-banner .logo img {
  height: 48px;
  width: auto;
  display: block;
}

/* nav */
.hero-banner nav { flex: 1; }
.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--fg);
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  font-weight: 400;
  font-size: 1.05rem;
  transition: color .18s ease, opacity .18s ease;
}
.nav-links a:hover { color: var(--accent); }

/* make sure header height variable is available */
:root { --header-h: 84px; }
.hero-banner { height: var(--header-h); }

/* ====== Base content box (shared common properties) ====== */
.content-box {
  width: min(1100px, 94%);
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
}

/* ====== Home page variant (dark overlay sitting on top of the video) ====== */
.home-page .content-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6); /* overlay background */
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  color: white;
  max-width: 600px;
}
body.home-page .content-box h1 {
  font-family: "JetBrains Sans", sans-serif;
  font-weight: 300;
  font-size: 2.4rem;
  margin-bottom: 0.4rem;
}
body.home-page .content-box p { max-width: 720px; margin: 0.6rem auto 0; }


/* ====== About page variant (light card on top of ice background) ====== */
body.about-page {
  background: url("/public/ice_web_bg.png") center center / cover no-repeat fixed;
  color: #111;
  background-color: #eaf6ff; /* fallback tone if image fails */
}

.about-container {
  padding-top: 20px;  /* instead of margin-top */
  padding-bottom: 60px;
  display: flex;
  justify-content: center;
  padding-left: 20px;
  padding-right: 20px;
}

/* Centered content card */
body.about-page .content-box {
  margin: calc(var(--header-h) + 60px) auto;
  padding: 48px 56px;
  background: rgba(255, 255, 255, 0.88);
  color: #111;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  border-radius: 16px;
  text-align: left;
  width: min(900px, 92%);
  backdrop-filter: blur(6px); /* adds a frosty effect on ice backgrounds */
}



/* Headings */
body.about-page .content-box h1 {
  font-family: "JetBrains Sans", sans-serif;
  font-weight: 400;
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: #00324d;
}

/* Paragraphs */
body.about-page .content-box p {
  line-height: 1.7;
  margin: 0.8rem 0;
  font-size: 1.05rem;
  color: #222;
}

/* Highlighted text (strong/em) */
body.about-page .content-box strong {
  color: #005f88;
  font-weight: 600;
}

/* Responsive tweaks */
@media (max-width: 800px) {
  body.about-page .content-box {
    padding: 32px 24px;
    margin: 100px 18px;
  }
  body.about-page .content-box h1 {
    font-size: 1.8rem;
  }
  .about-header {
    float: none;
    display: flex;
    justify-content: center;
    margin: 0 0 24px 0;
  }

  .about-photo {
    width: 140px;
  }
}

/* About page header layout */
.about-header {
  float: right;
  margin: 0 0 16px 32px; /* space between image and text */
}

/* Profile photo */
.about-photo {
  width: 300px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  object-fit: cover;
}


/* ====== Publication page ====== */
.publications-page {
  background: url("/public/generic_ice_bg.png") no-repeat center center fixed;
  background-size: cover;
}

/* Container for all publications */
.publications-container {
  padding-top: 140px;  /* instead of margin-top */
  padding-bottom: 60px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Each publication box */
.publication-box {
  background: rgba(255, 255, 255, 0.9);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover effect */
.publication-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.publication-box h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.5rem;
  font-weight: 500;
  color: #000;
}

.publication-box p {
  margin: 5px 0;
  font-size: 1rem;
  color: #333;
}

.publication-box a {
  color: #0077cc;
  text-decoration: none;
}

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


/* ===== Projects page ===== */
.projects-page {
  background: url("/public/generic_ice_bg.png") no-repeat center center fixed;
  background-size: cover;
}

.projects-container {
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 60px;
  max-width: 1000px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Project card */
.project-card {
  background: rgba(255,255,255,0.92);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}

/* Header (clickable) */
.project-header {
  all: unset;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 28px;
  width: 100%;
}

.project-header-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.project-header h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 500;
  color: #111;
}

.project-ingress {
  margin-top: 6px;
  font-size: 1rem;
  color: #444;
  max-width: 720px;
  word-wrap: break-word;
}

.project-date {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  color: #666;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 16px;
  margin-top: 16px;
}


/* Expandable section */
.project-details {
  display: none;
  padding: 0 28px 28px 28px;
  color: #222;
}

.project-card.open .project-details {
  display: block;
}

.project-details h3 {
  margin-top: 18px;
  margin-bottom: 6px;
  font-size: 1.1rem;
  font-weight: 500;
}

.project-details p {
  margin: 0 0 10px 0;
  line-height: 1.6;
}

/* Media */
.project-media {
  margin-top: 16px;
}

.project-media img,
.project-media iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  border: none;
}

/* Header content layout */
.project-header-main {
  display: flex;
  flex-direction: column;
}

/* Tags row */
.project-tags {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Individual tag */
.tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  color: #333;
  border: 1px solid rgba(0, 0, 0, 0.15);
  user-select: none;
}


/* ====== Contact page ========== */

/* Contact page background */
.contact-page {
  background: url("public/spaceice.png") no-repeat center center fixed;
  background-size: cover;
}

/* Contact box */
.contact-container {
  padding-top: 220px;  /* instead of margin-top */
  padding-bottom: 60px;
  display: flex;
  justify-content: center;
  padding-left: 20px;
  padding-right: 20px;
}
.contact-box {
  background: rgba(255, 255, 255, 0.9);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  max-width: 600px;
  width: 100%;
  text-align: center;
}

.contact-box h1 {
  margin-bottom: 20px;
  font-size: 2rem;
  color: #000;
}

.contact-box p {
  font-size: 1rem;
  color: #333;
  margin: 10px 0;
}

/* Links */
.contact-links {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.contact-links a {
  color: #0077cc;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.contact-links a:hover {
  color: #00d4ff;
  text-decoration: underline;
}



/* ====== Utility / layout ====== */
body {
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* buttons and small utilities (shared) */
.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255,255,255,0.12);
}
.btn--primary { background: rgba(0,212,255,0.12); border-color: rgba(0,212,255,0.5); }

/* responsive tweaks */
@media (max-width: 900px) {
  .hero-banner { padding: 12px 18px; }
  .nav-links { gap: 14px; font-size: 0.98rem; }
  body.about-page .content-box { margin: 80px 18px; padding: 28px; }
  body.home-page .content-box { padding: 48px 18px; }
}
