/* ==========================
   Roarbit Technologies Theme
   Responsive + Animated Nav
   ========================== */

:root {
  --bg: #000000;
  --accent: #20b2aa;
  --muted: #bfbfbf;
  --nav-padding-y: 0.45rem;
  --nav-padding-x: 0.75rem;
  --nav-anim-ms: 420ms; /* keep in sync with JS delay for best UX */
}

html, body {
  height: 100%;
  background: var(--bg);
  color: #e9ecef;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}


/* ---------------- NAVBAR ---------------- */
.navbar {
  background: transparent;
}

.navbar-brand {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* Make navbar toggler icon whiter and slightly larger for contrast */
.navbar-toggler {
  border-color: rgba(255,255,255,0.12);
  padding: 0.35rem 0.45rem;
}

/* Replace the default background SVG with a white-ish SVG */
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30' width='30' height='30'><path stroke='%23f6f6f6' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/></svg>");
  filter: brightness(0.98);
}

/* ---------------- NAV LINKS (desktop & mobile) ---------------- */
/* default: white text */
.nav-link {
  position: relative;
  display: inline-block;
  padding: var(--nav-padding-y) var(--nav-padding-x);
  color: #ffffff;
  text-decoration: none;
  overflow: hidden;
  z-index: 1;
  transition: color 0.22s ease, transform 0.16s ease;
  white-space: nowrap;
}

/* hover -> accent */
.nav-link:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* pseudo-element: accent background that will slide up from bottom */
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  z-index: -1;
  transform: translateY(100%); /* hidden below */
  transform-origin: bottom center;
  transition: transform calc(var(--nav-anim-ms)) cubic-bezier(.2,.9,.2,1);
  pointer-events: none;
  border-radius: 6px;
}

/* active state: background slides in and text becomes black */
.nav-link.active {
  color: #ffffff !important;
  font-weight: 600;
}

.nav-link.active::after {
  transform: scaleY(1);
}

/* When menu is collapsed (mobile) we want links to be full width and stacked */
@media (max-width: 991.98px) {
  .navbar-nav .nav-link {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: 6px;
    margin: 0.18rem 0;
  }

  /* ensure pseudo-element covers full width nicely on mobile */
  .navbar-nav .nav-link::after {
    border-radius: 6px;
  }
}

/* ---------------- visual helpers ---------------- */
.accent {
  color: var(--accent);
}

/* ---------------- content styles (unchanged) ---------------- */
.card {
  background: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.25s, box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(32, 178, 170, 0.15);
}

.section-title {
  border-left: 4px solid var(--accent);
  padding-left: 12px;
  margin-bottom: 1rem;
}

.btn-accent {
  background: var(--accent);
  border: 0;
  color: #001;
  font-weight: 600;
  transition: transform 0.18s, box-shadow 0.18s;
}

.btn-accent:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(32, 178, 170, 0.25);
}

.form-control.bg-black {
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e9ecef;
}

.form-control.bg-black:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(32, 178, 170, 0.25);
}

footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.text-muted {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* small tweak so that nav toggler icon is visible on dark background */
.navbar-toggler {
  border-color: rgba(255,255,255,0.06);
}

/* ---------------- accessibility / focus styles ---------------- */
.nav-link:focus {
  outline: none;
  box-shadow: 0 0 0 0.18rem rgba(32,178,170,0.12);
  border-radius: 6px;
}

/* ---------------- small devices ---------------- */
@media (max-width: 575px) {
  :root {
    --nav-padding-x: 0.6rem;
    --nav-padding-y: 0.42rem;
  }
}

/* Intro Quote Styling */
/* =========================
   Console typing animation
   CSS-only, responsive
   ========================= */

/* Console font stack */
.console-quote {
    font-family: "Consolas", "Courier New", Menlo, Monaco, monospace;
    max-width: 900px;
    margin: 2rem auto;
    color: #ffffff;
    position: relative;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--accent);
    box-sizing: border-box;
    line-height: 1.55;
}

/* Make text centered visually while inner text is typed left-aligned */
.console-quote {
    text-align: center;
}

.console-quote .console-line {
    display: inline-block;
    /* keep measured width by ch */
    text-align: left;
    /* typed text aligns left inside the block */
    white-space: nowrap;
    overflow: hidden;
    /* hide the not-yet-typed characters */
    vertical-align: bottom;
    color: #ffffff;
    font-size: 1.18rem;
    /* adjust as needed */
    line-height: 1.5;
    /* subtle letter spacing like terminal */
    letter-spacing: .02em;
}

/* Estimate character widths in ch units (use a bit more than actual length for safety) */
.console-quote .line1 {
    width: 0ch;
    /* line1 length approx 53 -> animate to 53ch */
    animation: typing-line1 2.6s steps(53, end) forwards;
}

/* second line starts after line1 finishes */
.console-quote .line2 {
    width: 0ch;
    /* delay equals line1 duration + small pause */
    animation: typing-line2 2.8s steps(60, end) forwards;
    animation-delay: 2.75s;
    /* shows after line1 completes */
}

/* Blinking cursor placed inline after the second line */
.console-cursor {
    display: inline-block;
    width: 0.6ch;
    height: 1.26em;
    margin-left: 0.25rem;
    vertical-align: bottom;
    background: transparent;
    border-right: .12em solid #ffffff;
    /* visible cursor */
    /* cursor blinks continuously */
    animation: blink-cursor 1s steps(2, start) infinite;
    /* appear slightly after typing begins so effect feels natural */
    animation-delay: 0s;
}

/* When typing finishes, keep cursor visible (or you can hide it by changing border-color) */
/* Optional: make the cursor change color to darker accent after typing finishes */
/* .console-quote .line2.finished + .console-cursor { border-right-color: var(--accent); } */

/* Keyframes: expand width from 0ch to Nch */
@keyframes typing-line1 {
    from {
        width: 0ch;
    }

    to {
        width: 53ch;
    }

    /* approximate characters in the first line */
}

@keyframes typing-line2 {
    from {
        width: 0ch;
    }

    to {
        width: 60ch;
    }

    /* approximate characters in the second line */
}

/* blinking */
@keyframes blink-cursor {
    0% {
        border-right-color: #ffffff;
        opacity: 1;
    }

    49% {
        border-right-color: #ffffff;
        opacity: 1;
    }

    50% {
        border-right-color: transparent;
        opacity: 0.15;
    }

    100% {
        border-right-color: transparent;
        opacity: 0.15;
    }
}

/* Responsive adjustments */
/* Reduce font-size and target widths on small screens */
@media (max-width: 900px) {
    .console-quote .console-line {
        font-size: 1.05rem;
    }

    @keyframes typing-line1 {
        to {
            width: 45ch;
        }
    }

    @keyframes typing-line2 {
        to {
            width: 52ch;
        }
    }
}

@media (max-width: 520px) {
    .console-quote {
        padding: .75rem 1rem;
    }

    .console-quote .console-line {
        font-size: 0.98rem;
    }

    @keyframes typing-line1 {
        to {
            width: 36ch;
        }
    }

    @keyframes typing-line2 {
        to {
            width: 40ch;
        }
    }
}

/* Keep the quoted decorative marks if you like (optional) */
.console-quote::before,
.console-quote::after {
    content: "";
    /* no extra quote symbols since we used inline text quotes */
    display: none;
}