@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Spectral:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

/* --- DESIGN SYSTEM TOKENS --- */
:root {
  /* Common Fonts */
  --font-heading: 'Spectral', Georgia, "Times New Roman", serif;
  --font-body: 'Lora', Georgia, "Times New Roman", serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  /* Global transitions */
  --transition-smooth: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.25);
  
  /* Defaults (linked to Section Overrides) */
  --accent-cyan: hsl(190, 85%, 45%);
  --accent-gold: hsl(45, 80%, 60%);
  --border-color: rgba(255, 255, 255, 0.15);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: hsl(220, 20%, 8%);
}
::-webkit-scrollbar-thumb {
  background: hsl(220, 10%, 25%);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

img {
  max-width: 100%;
  display: block;
}

/* Fixed Canvas background for starfield sections */
#starfield-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 0.4s ease;
}

/* --- REUSABLE UTILITIES --- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

.section {
  padding: 8rem 0;
  position: relative;
}

.text-center {
  text-align: center;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
  font-family: var(--font-heading);
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 1px;
  background-color: var(--accent-cyan);
  margin: 0.75rem auto 0 auto;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-style: italic;
  max-width: 650px;
  margin: 0 auto 4.5rem auto;
  opacity: 0.8;
}

/* --- SECTION 1: HERO & INTRO - WHITE TECHNICAL PAPER --- */
.section-paper {
  background-color: hsl(38, 20%, 97%); /* Warm archival paper */
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 30px 30px;
  color: hsl(210, 24%, 12%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  --border-color: rgba(0, 0, 0, 0.1);
  --accent-cyan: hsl(210, 80%, 40%); /* Ink blue accent */
  --accent-gold: hsl(35, 60%, 40%);
  --text-primary: hsl(210, 24%, 12%);
  --text-secondary: hsl(210, 15%, 35%);
  --text-muted: hsl(210, 10%, 60%);
}

.section-paper .section-title {
  color: hsl(210, 24%, 12%);
}

.section-paper .section-title::after {
  background-color: var(--accent-cyan);
}

.section-paper .section-subtitle {
  color: hsl(210, 15%, 35%);
}

.paper-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 5rem;
  align-items: center;
}

.paper-title {
  font-size: 4.8rem;
  line-height: 1.05;
  margin-bottom: 2rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: hsl(210, 24%, 12%);
}

.paper-description {
  font-size: 1.25rem;
  margin-bottom: 3rem;
  font-family: var(--font-body);
}

/* SVG Line Diagram Wrapper (Textbook Plate) */
.paper-diagram-box {
  border: 1px solid var(--border-color);
  padding: 1rem;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  position: relative;
  width: 100%;
}

.paper-diagram-box::after {
  content: var(--plate-text, 'PLATE I');
  position: absolute;
  top: var(--plate-top, 1rem);
  right: var(--plate-right, 1rem);
  bottom: var(--plate-bottom, auto);
  left: var(--plate-left, auto);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-cyan);
  border: 1px solid var(--border-color);
  padding: 0.15rem 0.35rem;
  background: var(--plate-bg, #fff);
  z-index: 10;
}

.paper-diagram-box svg {
  width: 100%;
  height: auto;
  display: block;
}

.paper-diagram-caption {
  margin-top: 1rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-style: italic;
  color: hsl(210, 15%, 45%);
  text-align: center;
}

/* Math formula in paper */
.paper-math {
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--accent-gold);
  margin: 1.5rem 0;
  font-size: 1.15rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
}

.paper-math code {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.03);
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border-color);
  color: hsl(210, 24%, 12%);
}

/* --- SECTION 2: GREEN CHALKBOARD (Darkened, Faint Eraser Wipes) --- */
.section-chalkboard {
  background-color: hsl(145, 30%, 6%); /* deep forest black fallback */
  background-image: 
    /* Vignette shading for depth */
    linear-gradient(to bottom, rgba(0, 0, 0, 0.35) 0%, transparent 15%, transparent 85%, rgba(0, 0, 0, 0.35) 100%),
    /* Darkening overlay to mute eraser streaks and darken the green */
    linear-gradient(rgba(10, 20, 15, 0.65) 0%, rgba(8, 16, 12, 0.72) 100%),
    /* The high-resolution erased chalkboard texture image */
    url('../img/green_chalkboard.png');
  background-size: 100% 100%, 100% 100%, cover;
  background-repeat: no-repeat;
  background-position: center;
  color: hsl(45, 10%, 93%); /* chalk white text */
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  --border-color: rgba(255, 255, 255, 0.15);
  --accent-cyan: hsl(190, 85%, 55%); /* Chalk cyan */
  --accent-gold: hsl(45, 80%, 70%); /* Chalk yellow */
  --text-primary: hsl(45, 10%, 93%);
  --text-secondary: hsl(145, 10%, 75%);
  --text-muted: hsl(145, 8%, 55%);
}

.section-chalkboard .section-title {
  color: hsl(45, 12%, 95%);
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.3), 0 0 4px rgba(255, 255, 255, 0.1);
}

.section-chalkboard .section-title::after {
  background-color: var(--accent-cyan);
}

.section-chalkboard .section-subtitle {
  color: hsl(145, 10%, 75%);
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.1);
}

.chalkboard-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 5rem;
  align-items: center;
}

.chalk-text {
  color: hsl(145, 10%, 88%);
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.2);
}

.chalk-header {
  color: hsl(45, 12%, 94%);
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.4), 0 0 4px rgba(255, 255, 255, 0.15);
  font-family: var(--font-heading);
}

.chalk-math {
  color: var(--accent-cyan);
  text-shadow: 0 0 2px rgba(0, 240, 240, 0.3);
  font-family: var(--font-heading);
  font-style: italic;
  margin: 1.5rem 0;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chalk-math code {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.9rem;
  background: rgba(14, 18, 26, 0.3);
  border: 1px solid rgba(0, 240, 240, 0.2);
  color: var(--accent-gold);
  text-shadow: 0 0 2px rgba(235, 185, 90, 0.3);
  padding: 0.2rem 0.5rem;
}

.chalk-photo-frame {
  background: #fff;
  padding: 1.25rem 1.25rem 2.25rem 1.25rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.15);
  transform: rotate(-1.5deg);
  transition: var(--transition-smooth);
  max-width: 100%;
  margin: 0 auto;
}

.chalk-photo-frame:hover {
  transform: rotate(0.5deg) scale(1.02);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
}

.chalk-photo {
  width: 100%;
  height: auto;
  filter: grayscale(100%) contrast(1.1) brightness(0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: block;
}

.chalk-photo-caption {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: hsl(210, 24%, 12%); /* Dark ink color for polaroid paper */
  text-align: center;
  margin-top: 1.25rem;
  font-style: italic;
}

/* --- SECTION 3: STARFIELD METRIC --- */
.section-starfield {
  background-color: hsl(220, 45%, 5%); /* Dark celestial space */
  color: hsl(210, 100%, 96%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  --border-color: rgba(180, 220, 255, 0.15);
  --accent-cyan: hsl(190, 100%, 50%);
  --accent-gold: hsl(45, 95%, 68%);
  --text-primary: hsl(210, 100%, 96%);
  --text-secondary: hsl(220, 15%, 75%);
  --text-muted: hsl(220, 10%, 50%);
}

.section-starfield .section-title {
  color: #fff;
}

.section-starfield .section-title::after {
  background-color: var(--accent-cyan);
}

.section-starfield .section-subtitle {
  color: hsl(220, 15%, 75%);
}

.starfield-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.starfield-card {
  background: rgba(220, 45, 5%, 0.15);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  backdrop-filter: var(--glass-backdrop);
  transition: var(--transition-smooth);
}

.starfield-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 240, 0.15);
}

.starfield-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  font-family: var(--font-heading);
}

/* --- NAVIGATION --- */
header.navbar-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  transition: var(--transition-smooth);
  background-color: var(--bg-primary);
}

/* Navigation text paper colors */
header.navbar-container {
  background-color: hsl(38, 20%, 97%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  color: hsl(210, 24%, 12%);
}

header.navbar-container.scrolled {
  background-color: rgba(246, 243, 238, 0.9);
  backdrop-filter: blur(10px);
  padding: 0.15rem 0;
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  transition: var(--transition-smooth);
}

header.navbar-container.scrolled .nav-wrap {
  padding: 0.85rem 0;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-brand svg {
  stroke: hsl(210, 80%, 40%);
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 3rem;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(210, 15%, 25%);
  position: relative;
  padding: 0.25rem 0;
}

.nav-link:hover {
  color: hsl(210, 80%, 40%);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: hsl(210, 80%, 40%);
  transition: var(--transition-smooth);
}

.nav-link:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  z-index: 101;
  padding: 0.5rem;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background-color: hsl(210, 24%, 12%);
  transition: var(--transition-smooth);
}

/* --- RESEARCH TEAM SECTION (Ledger Table Format) --- */
.team-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  background: #fff;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.team-table th, .team-table td {
  padding: 1.5rem 2rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.team-table th {
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  background-color: rgba(0, 0, 0, 0.02);
  color: hsl(210, 15%, 35%);
}

.team-role {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  color: var(--accent-cyan);
  margin-bottom: 0.25rem;
}

.team-specialty {
  color: hsl(210, 15%, 35%);
  font-size: 0.95rem;
}

.team-table tr:hover td {
  background-color: rgba(0, 0, 0, 0.01);
}

/* --- CALENDAR SECTION (Blackboard Scheduler) --- */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.calendar-card {
  border: 1px dashed var(--border-color);
  padding: 2.5rem;
  background: transparent;
  transition: var(--transition-smooth);
  position: relative;
}

.calendar-card::before {
  content: 'SCHEDULED';
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  border: 1px solid var(--border-color);
  padding: 0.1rem 0.3rem;
  color: var(--accent-gold);
  text-shadow: 0 0 1px rgba(255,255,255,0.1);
}

.calendar-card.completed::before {
  content: 'RECORDED';
  color: var(--accent-cyan);
}

.calendar-card:hover {
  border-style: solid;
  border-color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.02);
}

.calendar-date {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
  text-shadow: 0 0 1px rgba(255,255,255,0.1);
}

.calendar-card.completed .calendar-date {
  color: var(--accent-cyan);
}

.calendar-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  font-family: var(--font-heading);
}

.calendar-desc {
  color: hsl(145, 10%, 80%);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- FOOTER --- */
footer {
  background: hsl(38, 20%, 97%);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 5rem 0;
  text-align: center;
  color: hsl(210, 24%, 12%);
}

.footer-nav {
  margin-bottom: 2rem;
}

.footer-nav a {
  margin: 0 2rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  color: hsl(210, 15%, 35%);
}

.footer-nav a:hover {
  color: var(--accent-cyan);
}

.footer-credits {
  font-size: 0.85rem;
  color: hsl(210, 15%, 45%);
  font-family: var(--font-body);
}

.scroll-top-btn {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.1);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: hsl(210, 24%, 12%);
  margin-bottom: 2.5rem;
  transition: var(--transition-smooth);
}

.scroll-top-btn:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-5px);
  color: var(--accent-cyan);
}

/* --- SCROLL REVEALS --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- RESPONSIVE BREAKPOINTS --- */
@media (max-width: 992px) {
  .paper-grid, .chalkboard-grid, .starfield-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
    text-align: center;
  }
  
  .paper-diagram-box {
    margin-left: auto;
    margin-right: auto;
    max-width: 360px;
  }
  
  .paper-math, .chalk-math {
    justify-content: center;
  }
  
  .paper-title {
    font-size: 3.5rem;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: hsl(38, 20%, 97%);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3.5rem;
    transition: var(--transition-smooth);
    z-index: 100;
  }
  
  .nav-links.open {
    right: 0;
  }
  
  .hamburger {
    display: flex;
  }
  
  .hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
  }
  
  .hamburger.open span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
  }
}

@media (max-width: 768px) {
  .section {
    padding: 5rem 0;
  }
  
  .section-title {
    font-size: 2.5rem;
  }
  
  .team-table th, .team-table td {
    padding: 1rem;
    font-size: 0.85rem;
  }
}

/* --- CONTACT SECTION GRID --- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.contact-card {
  background: #fff;
  border: 1px solid var(--border-color);
  padding: 2.5rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  transition: var(--transition-smooth);
}

.contact-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.contact-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  color: var(--accent-cyan);
  transition: var(--transition-smooth);
}

.contact-card:hover .contact-icon-wrap {
  background: var(--accent-cyan);
  color: #fff;
}

.contact-icon {
  width: 24px;
  height: 24px;
}

.contact-card h4 {
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  color: hsl(210, 15%, 35%);
}

.contact-link {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: hsl(210, 24%, 12%);
  border-bottom: 1px solid transparent;
  transition: var(--transition-smooth);
}

.contact-card:hover .contact-link {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

@media (max-width: 992px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* --- CHALKBOARD FORM STYLING --- */
.log-form-container {
  transition: var(--transition-smooth);
}

.chalk-form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.chalk-form-group label {
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.chalk-form-group input,
.chalk-form-group select,
.chalk-form-group textarea {
  background: rgba(14, 18, 26, 0.4);
  border: 1px dashed var(--border-color);
  padding: 0.75rem 1rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.chalk-form-group input:focus,
.chalk-form-group select:focus,
.chalk-form-group textarea:focus {
  outline: none;
  border-style: solid;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 240, 0.15);
}

.chalk-form-group select option {
  background: hsl(145, 30%, 6%);
  color: #fff;
}

.chalk-btn:hover {
  border-style: solid !important;
  background: rgba(0, 240, 240, 0.05) !important;
  transform: translateY(-2px);
}

.chalk-btn-secondary:hover {
  border-style: solid !important;
  background: rgba(255, 255, 255, 0.02) !important;
}
