

/* ===== Global Reset ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
}

/* ===== Container / Wrapper ===== */
.page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
  flex: 1;
}

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--border-muted);/*var(--bg-dark);*/
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  backdrop-filter: saturate(110%) blur(6px);

    position: sticky;
}

.nav-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  position: static;
}

/* Left group of links */
.nav-left {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.nav-left a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition: background-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
  font-size: 0.95rem;
}

.nav-left a:hover {
  background: rgba(255,255,255,0.4);
  opacity: 0.9;
}

.dark-mode .nav-left a:hover {
  background: rgba(0,0,0,0.4);
  opacity: 0.9;
}

/* Ensure nav link colors respond to dark mode */
.dark-mode .nav-left a {
  color: var(--text);
}

/* ===== Theme Toggle (pill + thumb + icons) ===== */
.theme-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  line-height: 0;
  border-radius: 999px;
}

/* Track */
.toggle-track {
  width: 48px;
  height: 24px;
  background: var(--primary);
  border-radius: 999px;
  position: relative;
  padding: 2px;
  transition: background-color 0.22s ease;
  display: inline-block;
}

/* Thumb */
.toggle-thumb {
  width: 20px;
  height: 20px;
  background: var(--bg);
  border-radius: 50%;
  position: absolute;
  left: 2px;
  top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s cubic-bezier(.2,.9,.3,1), background 0.22s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* When dark-mode class exists on <html>, slide thumb to right */
.dark-mode .toggle-thumb {
  transform: translateX(24px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
}

/* SVG icons inside the thumb (stacked in same position) */
.toggle-thumb svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.6;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.20s ease, stroke 0.22s ease, fill 0.22s ease;
  fill: none;
  stroke: var(--text);
}

/* Default: show sun, hide moon */
.icon-sun {
  opacity: 1;
}

.icon-moon {
  opacity: 0;
}

/* In dark mode: show moon, hide sun; adapt stroke color */
.dark-mode .icon-sun {
  opacity: 0;
}

.dark-mode .icon-moon {
  opacity: 1;

}

/* Make sure svg strokes invert in dark mode when needed */
.dark-mode .toggle-thumb svg {
  stroke: var(--text);
}

/* Slightly change track color in dark mode */
.dark-mode .toggle-track {
  background: var(--primary);
}

/* Hover states */
.theme-toggle:hover .toggle-track {
  filter: brightness(0.98);
}





/* ===== Footer ===== */
.footer {
  width: 100%;
  background: var(--bg-dark);
  padding: 1rem;
  text-align: center;
  border-top: 1px solid var(--border-muted);
  margin-top: 2.5rem;
  transition: background 0.25s ease;
  position: relative;
}

.footer p {
  color: var(--text-muted);
}

.footer a {
  margin-left: 0.8rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

/* Turtle rests on the footer */
.turtle {
  position: absolute;
  bottom: 100%;       /* positions turtle ABOVE the footer */
  right: 40%;         /*  align to footer’s right edge */
  width: 70px;
  height: 70px;
  /*transform: translateY(30px);  optional: overlap the edge slightly for “resting” look */
  pointer-events: none;        /* turtle won’t block clicks */
}

.turtle-img {
    width: 90px;        /* small image */
    height: auto;
    position: absolute; /* place it anywhere inside */
    top: 50%;
    left: 50%;
    transform: translate(0%, -45%);
}

/* ===== Responsive tweaks ===== */
@media (max-width: 700px) {
  .landing-card {
    flex-direction: column;
    text-align: center;
  }

  .profile-image img {
    width: 120px;
    height: 120px;
  }

  .nav-left {
    gap: 0.5rem;
  }

  .nav-left a {
    font-size: 0.9rem;
    padding: 0.25rem 0.35rem;
  }
}

@media (max-width: 420px) {
  .nav-content {
    padding: 0 0.6rem;
  }
}


.nav-left a.active {
  background: var(--bg);
  color: var(--text) !important;
  font-weight: 600;
  border-radius: 6px;
}

.dark-mode .nav-left a.active {
  background: var(--bg);
  color: var(--text) !important;
}

.nav-left a {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* SVG styling */
.nav-left .icon {
  width: 16px;
  height: 16px;
  stroke: var(--text);
  fill: none;
  stroke-width: 1.8;
  transition: stroke 0.25s ease;
}

/* Ensure good contrast in dark mode */
.dark-mode .nav-left .icon {
  stroke: var(--text);
}

.no-theme-transition * {
  transition: none !important;
}



/* ================= MOBILE NAVBAR ================= */

@media (max-width: 800px) {

  .nav-content {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .nav-left {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }

  .nav-left a {
    font-size: 0.85rem;
    padding: 0.3rem 0.45rem;
  }

  .theme-toggle {
    margin-left: auto;
  }

}

/* ================= SMALL PHONES ================= */

@media (max-width: 500px) {

  .page-wrapper {
    padding: 1.5rem 0.8rem;
  }

  .nav-left {
    gap: 0.35rem;
  }

  .nav-left a {
    font-size: 0.8rem;
  }

  .toggle-track {
    width: 48px;
    height: 24px;
  }

}

/* ===== HAMBURGER ===== */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 28px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

@media (max-width: 800px) {

  .hamburger {
    display: flex;
  }

   .nav-left {
    position: absolute;
    top: 100%;
    left: 0;

    width: 100%;

    background: var(--bg-light);
    border-bottom: 1px solid var(--border);

    flex-direction: column;
    align-items: center;
    gap: 12px;

    padding: 16px 0;

    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;

    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 2000;
  }

  .nav-left.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-left a {
    font-size: 1rem;
  }

}


.hamburger.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}