/* Import Google Fonts - this loads the Roboto font family from Google's servers */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

/* Style the entire body of the webpage */
body {
  font-family: 'Roboto', 'Inter', 'Montserrat', Arial, system-ui, sans-serif;
  background: linear-gradient(135deg, #f8f8ff 0%, #e6e6fa 100%);
  color: #222;
  margin: 0;
  padding: 0;
  font-size: 16px;
  letter-spacing: 0.01em;
}

/* Style the header section at the top of the page */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  border-bottom: none;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Style the left section of the header */
header .left {
  flex: 0 0 auto;
}

header .home-link {
  color: #a200a2;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.3s ease;
  padding: 8px 0;
  display: inline-block;
}

header .home-link:hover {
  color: #7a007a;
}

/* Style the center section of the header */
header .center {
  font-weight: 700;
  text-align: center;
  font-size: 20px;
  color: #3d0066;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  flex: 1;
  padding: 0 20px;
}

/* Navigation styles */
.main-nav {
  flex: 0 0 auto;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: block;
  position: relative;
}

.nav-link:hover {
  background-color: rgba(162, 0, 162, 0.1);
  color: #a200a2;
}

/* Dropdown menu styles */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1000;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 10px 20px;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 15px;
}

.dropdown-item:hover {
  background-color: #f8f0ff;
  color: #a200a2;
  padding-left: 25px;
}

/* Dropdown arrow */
.dropdown-toggle::after {
  content: '▼';
  font-size: 8px;
  margin-left: 6px;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::after {
  transform: rotate(180deg);
}
header .center:hover {
  color: #a200a2;
}

/* Style the span element inside the center section */
header .center span {
  font-size: 13px;
  color: #666;
  font-style: italic;
  letter-spacing: 0.04em;
}

/* Style links in the right section of the header */
header .right, header .right a {
  color: #3d0066;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: color 0.2s;
}
header .right:hover, header .right a:hover {
  color: #a200a2;
}

/* Style the main content area */
main {
  max-width: 900px;
  margin: 70px auto 70px auto;
  padding: 0 28px;
  background: rgba(255,255,255,0.95);
  border-radius: 18px;
  box-shadow: 0 6px 32px 0 #a200a222, 0 1.5px 8px 0 #a200a205;
  min-height: 600px;
  position: relative;
}

/* Style the project year/date */
.project-meta {
  font-size: 15px;
  color: #a200a2;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
  font-weight: 600;
  text-shadow: 0 1px 8px #e6e6fa33;
  margin-top: 36px;
}

/* Style the main project title */
.project-title {
  font-size: 32px;
  font-weight: 800;
  color: #3d0066;
  margin-bottom: 0px;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 12px #e600ff33;
  cursor: pointer;
  transition: color 0.22s, text-shadow 0.22s;
}
.project-title:hover {
  color: #a200a2;
  text-shadow: 0 2px 18px #e600ff88;
}

/* Style the project subtitle */
.project-subtitle {
  font-size: 18px;
  color: #666;
  margin-bottom: 2px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* Style the advisor information */
.advisor {
  font-size: 15px;
  margin-bottom: 38px;
  color: #a200a2;
  font-weight: 500;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, #e6e6fa 0%, #fff 100%);
  padding: 3px 12px 3px 0;
  border-radius: 8px;
  display: inline-block;
  box-shadow: 0 1px 6px #a200a211;
}

/* Style section titles (like "Abstract", "Motivation") */
.section-title {
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 48px;
  margin-bottom: 16px;
  font-size: 18px;
  color: #a200a2;
  letter-spacing: 0.08em;
  opacity: 0;
  animation: fadeInTitle 1s forwards;
}
@keyframes fadeInTitle {
  to { opacity: 1; }
}

/* Style all paragraph elements */
p {
  font-size: 16px;                    /* Set font size to 16 pixels */
  line-height: 1.6;                   /* Set space between lines to 1.6 times the font size */
  margin-bottom: 24px;                /* Add 24 pixels of space below each paragraph */
  color: #111;                        /* Set text color to dark gray (almost black) */
}

/* Style for our interactive button */
button {
  background-color: #111;             /* Set button background to dark gray */
  color: white;                       /* Set button text color to white */
  border: none;                       /* Remove the default button border */
  padding: 12px 24px;                 /* Add 12px top/bottom, 24px left/right spacing inside */
  font-size: 14px;                    /* Set button text size to 14 pixels */
  font-weight: 400;                   /* Set font weight to normal */
  cursor: pointer;                    /* Change mouse cursor to hand when hovering over button */
  margin-bottom: 20px;                /* Add 20 pixels of space below the button */
  transition: background-color 0.3s;  /* Smooth color change animation (0.3 seconds) */
  border-radius: 4px;                 /* Add slightly rounded corners to the button */
}

/* Change button appearance when user hovers over it */
button:hover {
  background-color: #333;             /* Change background to lighter gray on hover */
}

/* Style for the message display area */
#messageDisplay {
  font-size: 16px;                    /* Set font size to 16 pixels */
  line-height: 1.6;                   /* Set space between lines */
  margin-top: 20px;                   /* Add 20 pixels of space above this element */
  padding: 16px;                      /* Add 16 pixels of spacing inside the element */
  border: 1px solid #ccc;             /* Add a light gray border around the element */
  background-color: #f9f9f9;          /* Set background color to very light gray */
  border-radius: 4px;                 /* Add slightly rounded corners */
  min-height: 20px;                   /* Set minimum height so the area is visible even when empty */
}

/* Style for D3.js canvas containers to add spacing between them */
#d3-container-1,
#d3-container-2,
#d3-container-3 {
  margin-bottom: 48px;
  border: none;
  border-radius: 18px;
  overflow: visible;
  position: relative;
  box-shadow: 0 4px 32px #a200a222, 0 1.5px 8px #a200a205;
  background: rgba(255,255,255,0.98);
  padding: 18px 14px 24px 14px;
}

/* Add extra spacing after the last canvas container */
#d3-container-3 {
  margin-bottom: 60px;                /* Extra space after the last canvas */
}

/* Hurricane spiral spin animation */
@keyframes hurricane-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.hurricane-spiral path {
  animation: hurricane-spin 2.5s linear infinite, hurricane-color-shift 3.5s linear infinite;
  transform-box: fill-box;
  transform-origin: 50% 50%;
  stroke: #00bfff;
}

.catastrophic-spiral path {
  animation: hurricane-spin 2.5s linear infinite, catastrophic-color-shift 2.2s linear infinite !important;
  stroke: #ff1a1a !important;
}

@keyframes catastrophic-color-shift {
  0%   { stroke: #ff1a1a; }
  20%  { stroke: #ff3333; }
  40%  { stroke: #ff4d4d; }
  60%  { stroke: #ff6666; }
  80%  { stroke: #ff0000; }
  100% { stroke: #ff1a1a; }
}

@keyframes hurricane-color-shift {
  0%   { stroke: #00bfff; }
  20%  { stroke: #00ffea; }
  40%  { stroke: #6a5acd; }
  60%  { stroke: #ff00cc; }
  80%  { stroke: #ffd700; }
  100% { stroke: #00bfff; }
}

/* Style for D3.js tooltips */
.tooltip {
  z-index: 1000;                      /* Ensure tooltip appears above other elements */
}

/* Style for important notes and CSV modification sections */
.important-note,
.csv-modification {
  background-color: #f8f9fa;          /* Light gray background */
  border-left: 4px solid #007bff;     /* Blue left border for emphasis */
  padding: 16px;                      /* Internal spacing */
  margin: 20px 0;                     /* External spacing */
  border-radius: 4px;                 /* Rounded corners */
}

.important-note {
  border-left-color: #dc3545;         /* Red border for important notes */
  background-color: #fff5f5;          /* Light red background */
}

.csv-modification {
  border-left-color: #28a745;         /* Green border for CSV modification info */
  background-color: #f8fff9;          /* Light green background */
}

.important-note strong,
.csv-modification strong {
  color: #333;                        /* Dark text for emphasis */
}

.important-note ol,
.csv-modification ul {
  margin: 12px 0;                     /* Spacing for lists */
  padding-left: 20px;                 /* Indent lists */
}

.important-note li,
.csv-modification li {
  margin-bottom: 8px;                 /* Space between list items */
  line-height: 1.5;                   /* Line height for readability */
}

.csv-modification code {
  background-color: #e9ecef;          /* Light gray background for code */
  padding: 2px 6px;                   /* Small padding around code */
  border-radius: 3px;                 /* Rounded corners for code */
  font-family: 'Courier New', monospace; /* Monospace font for code */
  font-size: 14px;                    /* Slightly smaller font for code */
}
