/* ==========================================================
   CORE STYLESHEET — MechaCrypt Website Theme
   ========================================================== */


/* ----------------------------------------------------------
   1. COLOR PALETTE & BASE VARIABLES
   ---------------------------------------------------------- */
:root {
  --bg: #0c1125;          /* main background base tone */
  --nav: #0a0f1f;         /* navbar tone (darker for contrast) */
  --card: #202943;        /* card panels and surface contrast */
  --muted: #aab3c2;       /* subdued text color */
  --accent: #5aa9ff;      /* cyan-blue accent color */
  --good: #22c55e;        /* success / positive feedback */
  --warn: #f59e0b;        /* warning / amber tone */
  --bad: #ef4444;         /* error / alert tone */
}


/* ----------------------------------------------------------
   2. BODY & GLOBAL TYPOGRAPHY
   ---------------------------------------------------------- */
body {
  background: radial-gradient(1000px 700px at 25% 15%, #18213d  0%, var(--bg) 80%);
  color: #ffffff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, Noto Sans;
  line-height: 1.75;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ---------- Improve Paragraph Readability ---------- */

p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #dbe6ff;
  margin-bottom: 18px;
}

/* Strong text contrast */
strong {
  color: #ffffff;               /* pure white for contrast */
  font-weight: 700;
}

/* ---------- Figure Caption Styling ---------- */

.figure-caption, figcaption {
  color: #9fb4d1 !important;
  font-size: 0.9rem !important;
  margin-top: 6px;
  text-align: center;
  font-style: italic;
}


/* ----------------------------------------------------------
   3. NAVBAR STYLING & ALIGNMENT
   ---------------------------------------------------------- */

/* Navbar container setup */
.navbar, header.navbar {
  background: var(--nav) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 3px 10px rgba(0,0,0,0.5);
  padding: 12px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* distribute links & icons */
  flex-wrap: wrap;
  position: relative;
  min-height: 56px; /* visual balance */
}

/* Navbar title (website name) */
.navbar-title {
  color: #f5f8ff !important;
  font-weight: 700;
  letter-spacing: 0.4px;
}

/* Center navigation links group (Overview, System, etc.) */
.navbar-nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex: 1;
}

/* Right-side icons (GitHub, Paper-plane) */
.navbar-nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

/* Navigation link text with flowing light animation */
.navbar a {
  position: relative;
  color: #d8dde7 !important;
  text-decoration: none;
  padding: 4px 0;
  background: linear-gradient(90deg, var(--accent), #9cd1ff, var(--accent));
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position 0.6s ease, color 0.25s ease;
}


/* Flowy “energy” animation for link hover */
.navbar a:hover {
  animation: textFlow 1.8s linear infinite;
  filter: drop-shadow(0 0 10px rgba(90,169,255,0.75));
  opacity: 1;
  text-shadow: 0 0 12px rgba(150, 210, 255, 0.6), 
               0 0 22px rgba(90,169,255,0.4);
  transition: filter 0.3s ease, text-shadow 0.3s ease;
}

@keyframes textFlow {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ---------- Navbar Icon Styling (Static Blue Shade, No Hover) ---------- */
.navbar .fa,
.navbar .bi {
  font-size: 1.3rem;
  color: var(--accent); /* keep steady blue tone */
  transition: none;     /* disable hover animations */
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: var(--accent) !important;
}


/* Ensure icons align neatly with text */
.navbar .nav-item {
  display: flex;
  align-items: center;
}


/* ----------------------------------------------------------
   4. HEADINGS & TYPOGRAPHY STYLES
   ---------------------------------------------------------- */
/* h1, h2, h3, h4 {
  font-weight: 600;
  color: #f8faff;
} */

/* ---------- Enhanced Headings ---------- */

h2, h3, h4 {
  font-weight: 700;
  color: #eaf2ff;               /* brighter */
  letter-spacing: 0.4px;
  margin-top: 40px;             /* more vertical space */
}

h2 {
  font-size: 1.9rem;
  border-left: 4px solid #5aa9ff;
  padding-left: 12px;
  margin-bottom: 12px;
}

h3 {
  font-size: 1.5rem;
  color: #cfe4ff;
  margin-bottom: 8px;
}
h3 {
  color: #cfe4ff;
  text-shadow: 0 0 4px rgba(90,169,255,0.35);
}

h4 {
  font-size: 1.2rem;
  color: #b8d6ff;
  opacity: 0.9;
}

h2:hover, h3:hover {
  text-shadow: 0 0 6px rgba(90,169,255,0.6);
  transition: text-shadow 0.3s ease;
}


/* ----------------------------------------------------------
   5. CARD COMPONENTS
   ---------------------------------------------------------- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 22px 26px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
  margin-bottom: 26px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(90,169,255,.25);
}


/* ----------------------------------------------------------
   6. GRID LAYOUT
   ---------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 22px;
}

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


/* ----------------------------------------------------------
   7. META ELEMENTS (BADGES, FOOTER, ETC.)
   ---------------------------------------------------------- */
.badge {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid #2a3557;
  padding: 4px 8px;
  border-radius: 999px;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 45px;
}

/* ==========================================================
   FOOTER CONTAINER
   ========================================================== */

/* Remove background from Quarto's footer wrapper containers */
.page-footer,
.nav-footer,
.quarto-page-footer,
div.nav-footer,
div.page-footer {
  background: #0a0f1f !important;         /* same dark tone as your footer */
  background-color: #0a0f1f !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--muted) !important;
}

/* Remove Bootstrap white body variable bleed */
:root {
  --bs-body-bg: transparent !important;
}

/* Keep your actual footer dark and consistent */
footer.footer {
  background: #0a0f1f !important;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 0;
  font-size: 13px;
  letter-spacing: 0.25px;
  text-align: center;
  color: var(--muted) !important;
}

/* ==========================================================
   NAVBAR DROPDOWN STYLING (MATCH HEADER STYLE)
   ========================================================== */

/* Base dropdown menu container */
.navbar .dropdown-menu {
  background-color: #0f1732;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  padding: 6px 0;
  min-width: 210px;
}

/* Each dropdown item */
.navbar .dropdown-item {
  color: #d8dde7;
  background: linear-gradient(90deg, var(--accent), #9cd1ff, var(--accent));
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 500;
  padding: 10px 16px;
  transition: all 0.3s ease;
}

/* Hover animation + glow (same as headers) */
.navbar .dropdown-item:hover {
  animation: textFlow 1.8s linear infinite;
  background-position: 200% center;
  filter: drop-shadow(0 0 6px rgba(90,169,255,0.5));
  transform: translateX(3px);
}

/* Remove white background when dropdown is open */
.navbar .dropdown-menu.show {
  background: #0f1732;
  backdrop-filter: blur(4px);
}

/* ==========================================================
   FOOTER STYLING
   ========================================================== */

/* ---------- Footer Text and Link Styling ---------- */
footer {
  color: #f8faff; /* bright white base for normal text */
  font-weight: 500;
}

/* Bold white for "MechaCrypt Project" and other strong tags */
footer strong {
  color: #f8faff;
  font-weight: 700;
}

/* Footer links (names) — blue-glow base, stronger glow on hover */
footer a {
  color: #5aa9ff; /* glowy blue tone for linked names */
  font-weight: 700;
  text-decoration: none;
  filter: drop-shadow(0 0 3px rgba(90,169,255,0.6)); /* subtle default glow */
  transition: filter 0.4s ease, transform 0.3s ease;
}

/* Hover — expand the glow radius for a soft circular pulse */
footer a:hover {
  filter: drop-shadow(0 0 10px rgba(90,169,255,0.8)) 
          drop-shadow(0 0 20px rgba(90,169,255,0.6));
  transform: scale(1.02); /* small lift for interactivity */
}

/* Override paragraph styles specifically in footer */
footer p {
  color: #aab3c2;
  font-size: inherit;
  line-height: inherit;
}

/* Bold white for "MechaCrypt Project" and other strong tags */
footer strong {
  color: #f8faff;
  font-weight: 700;
}

/* ==========================================================
   PROFILE LINKS SECTION (ICONS + LABELS)
   ========================================================== */
/* Container */
.profile-links {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-top: 0.75rem;
}

/* The clickable block */
.profile-icon-block {
  text-align: center;
  text-decoration: none; /* base */
  color: inherit;
  display: inline-block;
}

/* The text label under the icon */
.profile-icon-block div {
  color: var(--accent);        /* blue link color */
  text-decoration: underline;  /* always underlined */
  font-weight: 500;
  transition: color 0.25s ease;
  margin-top: 0.0rem; /* add some space here */
}

/* The icon styling */
.profile-icon {
  font-size: 1.5rem;
  color: var(--accent);
  display: block;
  margin: 0 auto 0.0rem;
  opacity: 0.9;
  transition:
    transform 0.25s ease,
    filter 0.35s ease,
    opacity 0.25s ease;
}

/* ---------- Hover Glow ONLY on icon ---------- */
.profile-icon-block:hover .profile-icon {
  opacity: 1;
  transform: scale(1.18);
  filter: drop-shadow(0 0 10px rgba(90,169,255,0.8))
          drop-shadow(0 0 20px rgba(90,169,255,0.6));
}

/* Keep link text looking like a normal link */
.profile-icon-block:hover div {
  color: var(--accent);            /* stays blue */
  text-decoration: underline;      /* stays underlined */
}

/* Keep link text looking like a normal link */
.profile-icon-block:hover div {
  color: var(--accent);            /* stays blue */
  text-decoration: underline;      /* stays underlined */
}

/* ==========================================================
   TABLE STYLING
   ========================================================== */

/* Override Quarto's default white table background */
table {
  background: transparent !important;
  color: #dbe6ff !important;
  border-collapse: collapse;
  width: 100%;
  margin: 24px 0;
}

/* Table headers */
table thead th {
  background: rgba(90, 169, 255, 0.15) !important;
  color: #f8faff !important;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 2px solid var(--accent);
  text-align: left;
}

/* Table cells */
table tbody td {
  background: rgba(255, 255, 255, 0.03) !important;
  color: #dbe6ff !important;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Alternate row coloring */
table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.05) !important;
}

/* Hover effect on rows */
table tbody tr:hover td {
  background: rgba(90, 169, 255, 0.1) !important;
  transition: background 0.2s ease;
}

/* Table links */
table a {
  color: var(--accent);
  text-decoration: underline;
}

table a:hover {
  color: #9cd1ff;
  filter: drop-shadow(0 0 4px rgba(90,169,255,0.5));
}