:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #2d334a;
  --muted: rgba(45,51,74,0.7);
  --primary: #1e88e5;
  --accent: #ffe082;
  --glass-bg: rgba(255,255,255,0.06);

  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: var(--text);
  background-color: var(--bg);

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.topbar {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 9999; /* very high so it sits above the hero and overlays the image */
  pointer-events: auto;
  display: block;
  will-change: transform, opacity;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 20px;
  margin: 0 auto;
  max-width: 1100px;
  box-sizing: border-box;

  /* glass effect */
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 6px 18px rgba(10, 10, 10, 0.18);
  border-radius: 12px;
}

/* Brand */
.topbar .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
}

/* Nav list */
.topbar .nav-list {
  display: flex;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.topbar .nav-list li a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 160ms, color 160ms, transform 160ms;
  font-size: 15px;
  -webkit-tap-highlight-color: transparent;
}

.topbar .nav-list li a:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.topbar .nav-list li a.active,
.topbar .nav-list li a[aria-current="page"] {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18) inset;
}

/* Toggle for small screens */
.topbar-toggle {
  display: none;
  background: transparent;
  color: #fff;
  border: none;
  font-size: 22px;
  cursor: pointer;
}

/* Important: keep body content under the fixed topbar visually (no automatic push) */
/* Removing the large top padding allows the topbar to overlap the hero image */
body {
  font-family: 'Georgia', serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0; /* no top padding -> topbar overlaps the page/hero */
  text-align: center;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  transition: background-color 0.5s ease;
}

/* Small screens: collapse nav into toggle */
@media (max-width: 720px) {
  .topbar {
    top: 8px;
    left: 8px;
    right: 8px;
  }

  .topbar-inner {
    padding: 8px 14px;
    height: auto;
    border-radius: 8px;
  }

  .topbar-toggle {
    display: inline-block;
  }

  .topbar .nav-list {
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(64px + 12px);
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 10px;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    display: none;
  }

  .topbar .nav-list.open {
    display: flex;
  }

  /* on mobile you still might want some breathing room when the nav opens;
     we keep no permanent top padding so the topbar overlaps the hero */
}

/* ---- original styles continues below ---- */

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

/* Note: parallax header expects the background gif to be present at the referenced path */
.parallax-header {
  position: relative;
  height: 100vh;
  min-height: 0;
  background-image: url('././public/2025-10-27+19-37-34.gif');
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* keep the overlay gradient behind the topbar by using a lower z-index here */
.parallax-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0.45));
  z-index: 1;
}

.parallax-content {
  position: relative;
  z-index: 2;
  color: white;
  text-align: center;
  padding: 20px;
  animation: fadeInUp 1.5s ease-out;
}

.parallax-content h1 {
  color: #ffffff;
  font-size: 4em;
  margin-bottom: 0.2em;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.parallax-content h2 {
  color: #e0e0e0;
  font-size: 1.5em;
  margin-top: 0;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

.parallax-content .icon {
  font-size: 6em;
  color: #ffffff;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  animation: float 3s ease-in-out infinite;
}

.parallax-content .banner {
  background-color: rgba(255, 224, 130, 0.9);
  color: #2d334a;
  font-weight: bold;
  padding: 15px 30px;
  border-radius: 10px;
  margin-top: 20px;
  font-size: 1.2em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: inline-block;
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid rgba(34,51,68,0.08);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}
.btn-secondary:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(90deg, var(--primary), #2b7edc);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(30,136,229,0.18);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:focus { outline: 3px solid rgba(30,136,229,0.18); }

.hidden { display: none !important; }

.parallax-content .icon.hide {
  animation: baconOut 420ms cubic-bezier(.2,.9,.2,1) forwards;
}
@keyframes baconOut {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  60% { transform: translateY(-18px) scale(0.9); opacity: 0.6; }
  100% { transform: translateY(-60px) scale(0); opacity: 0; }
}

@media (max-width: 600px) {
  .contact-panel, .dashboard-panel { width: 96%; max-height: 92vh; padding: 14px; }
}

.live-preview {
  position: absolute;
  right: 18px;
  top: 18px;
  background: rgba(0,0,0,0.5);
  color: #e6edf3;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Roboto Mono', monospace;
  font-size: 0.9rem;
  max-width: 320px;
  max-height: 48vh;
  overflow: auto;
  box-shadow: 0 8px 30px rgba(2,6,23,0.6);
  z-index: 5;
}
.live-preview.hidden { display: none; }
.live-preview.visible { display: block; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.dashboard-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px 20px;
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-align: center;
  min-height: 220px;
}

.dashboard-card:nth-child(2) {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.dashboard-card:nth-child(3) {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.dashboard-card:nth-child(4) {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.dashboard-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}

.card-icon {
  font-size: 3em;
  margin-bottom: 15px;
  animation: pulse 2s ease-in-out infinite;
}

.dashboard-card h3 {
  color: white;
  font-size: 1.2em;
  margin: 10px 0;
}

.card-value {
  font-size: 2.5em;
  font-weight: bold;
  color: white;
  margin: 15px 0;
}

.dashboard-card p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9em;
  margin: 0;
  opacity: 1;
}

h1 {
  color: #1e88e5;
  font-size: 3em;
  margin-bottom: 0.5em;
  animation: fadeIn 2s ease-in-out;
}

h2 {
  color: #43a047;
  margin-top: 1.5em;
  animation: fadeIn 2s ease-in-out;
}

p {
  font-size: 1.05em;
  line-height: 1.6em;
  margin: 0 0 20px;
  opacity: 1;
}

.container {
  max-width: 1080px;
  margin: 24px auto;
  background-color: var(--surface);
  padding: 28px 22px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(34, 51, 68, 0.08);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.container:hover {
  box-shadow: 0 8px 24px rgba(34, 51, 68, 0.15);
}

.message {
  background-color: #e3f2fd;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  animation: fadeIn 2s ease-in-out;
}

.message p {
  font-style: italic;
  color: #1e88e5;
}

.icon {
  font-size: 5em;
  color: #1e88e5;
  animation: pulse 1.5s infinite;
  margin-bottom: 0.5em;
}

.banner {
  background-color: #ffe082;
  color: #2d334a;
  font-weight: bold;
  padding: 15px 10px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 1.1em;
  box-shadow: 0 2px 8px rgba(34, 51, 68, 0.07);
  animation: fadeIn 1s ease-in-out;
}

footer {
  margin-top: auto;
  padding: 20px 10px;
  background-color: #fff;
  box-shadow: 0 -2px 10px rgba(34, 51, 68, 0.05);
  border-top: 1px solid #e0e0e0;
  font-size: 1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeIn 2s ease-in-out forwards;
}

footer a {
  color: #1e88e5;
  text-decoration: underline;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@media (max-width: 600px) {
  h1 { font-size: 2.2em; }
  h2 { font-size: 1.5em; }
  p { font-size: 1em; }
  .container { padding: 20px 15px; margin: 15px; }
  .banner { font-size: 1em; padding: 12px; }
  footer { font-size: 0.95em; padding: 15px 10px; }
  .icon { font-size: 4em; }
  
  .parallax-header {
    background-attachment: scroll;
    min-height: 500px;
  }
  
  .parallax-content h1 {
    font-size: 2.5em;
  }
  
  .parallax-content h2 {
    font-size: 1.2em;
  }
  
  .parallax-content .icon {
    font-size: 4em;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .dashboard-card {
    padding: 25px 15px;
  }
}

@media (min-width: 1200px) {
  .container { max-width: 1000px; padding: 30px 40px; }
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}
