/* ── Imports ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Satoshi:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;700&display=swap');

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

/* Body setup */
body {
  background: #000000;
  color: #ffffff;
  font-family: "IBM Plex Mono", monospace;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  text-align: center;
}

/* Theme toggle button (minimal styling) */
.theme-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 50px;
  height: 28px;
  background: #111;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  transition: background 0.25s ease;
  z-index: 9999;
}

/* Knob */
.theme-toggle::before {
  content: '';
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin: 2px;
  background: #39ff14;
  transition: transform 0.25s ease, background 0.25s ease;
}

/* Light mode variants */
body.light {
  background: #ffffff;
  color: #222222;
}
body.light .theme-toggle {
  color: #222222;
  border-color: rgba(0,0,0,0.08);
}

/* Main wrapper */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 650px;
  width: 100%;
}

/* Heading */
h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #39ff14;
}

/* About paragraph */
.about {
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
  color: #f5f5f5;
}

/* Links list */
.links {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.links li {
  margin: 12px 0;
}

/* Matrix-style lime green links */
.links a {
  background: #39ff14;
  color: rgb(0, 0, 0);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition: color 0.3s ease, background 0.3s ease;
}

.links a:hover {
  background: black;
  color: #39ff14;
}

/* Email link styling */
.email a {
  display: inline-block;
  color: #000000;
  background: #39ff14;
  padding: 2px 4px;
  border-radius: 0px;
  text-decoration: none;
  font-weight: 400;
  font-size: 0.9rem;
  transition: color 0.3s ease, background 0.3s ease;
}

.email a:hover {
  color: #39ff14;
  background: black;
}

.links li.submenu {
  margin-top: 0;
  margin-bottom: 12px;
}

.email span {
  font-size: xx-small;
}

/* Submenu */
.submenu {
  display: inline-block;
  position: relative;
  margin-top: 0;
  padding-top: 0;
}

.submenu .dropdown {
  display: block;
  padding: 0;
  list-style: none;
  white-space: nowrap;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
  text-align: center;
  margin-top: 0;
}

.submenu .dropdown.show {
  max-height: 500px;
  opacity: 1;
  margin-top: 4px;
}

.submenu .dropdown a {
  display: inline-block;
  background: #39ff14;
  color: rgb(0,0,0);
  text-decoration: none;
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 0px;
  margin: 2px 0;
  transition: color 0.3s ease, background 0.3s ease;
}

.submenu .dropdown a:hover {
  color: #39ff14;
  background: black;
}

.highlight {
  text-decoration: underline;
  text-decoration-color: #39ff14;
  text-decoration-thickness: 2px;
}

/* Copy button */
.copy-btn {
  background: #39ff14;
  color: black;
  border: none;
  padding: 2px 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.3s ease, background 0.3s ease;
  margin-left: 6px;
  border-radius: 0px;
}

.copy-btn:hover {
  background: black;
  color: #39ff14;
}

/* Email group */
.email {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.email > a,
.email > .copy-btn {
  flex: 0 0 auto;
}

/* Copied message */
.copy-msg {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  color: #000000;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  margin-top: 28px;
  transition: opacity 0.25s ease, max-height 0.25s ease, margin-top 0.25s ease;
}

.copy-msg.show {
  opacity: 1;
  max-height: 40px;
}

/* Tooltips */
.email-link[data-tooltip],
.copy-btn[data-tooltip] {
  position: relative;
  cursor: pointer;
}

.email-link[data-tooltip]::after,
.copy-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: black;
  color: #39ff14;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.email-link[data-tooltip]:hover::after,
.copy-btn[data-tooltip]:hover::after {
  opacity: 1;
}

/* Email link and copy button unified sizing */
.email a,
.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  font-size: 0.75rem;
  line-height: 1.3;
  border-radius: 0px;
  text-decoration: none;
  background: #39ff14;
  color: black;
  cursor: pointer;
  transition: color 0.3s ease, background 0.3s ease;
}

.brandparent {
  display: flex;
  justify-content: center;
}

.brands {
  max-width: 400px;
  font-size: 0.5rem;
  margin-bottom: 40px;
  text-align: center;
  line-height: 2.0;
}

.brands .brandunderline {
  text-decoration: underline;
  text-decoration-color: #00A859;
}

/* Disable tooltips on mobile */
@media (max-width: 768px) {
  [data-tooltip]::after,
  [data-tooltip]::before {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  .js-tooltip {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  h1 {
    font-size: 1.7rem;
    margin-top: 24px !important;
  }
  .about {
    font-size: 0.95rem;
  }
  .links a,
  .email a {
    font-size: 1rem;
    padding: 6px 10px;
  }
  .email a {
    font-size: .75rem;
  }
  .email a,
  .copy-btn {
    padding: 3px 8px;
    font-size: 0.75rem;
  }
  .submenu .dropdown a {
    padding: 6px 12px;
    font-size: 0.6rem;
  }
  .links li {
    margin: 16px 0;
  }
}

/* Mobile tap */
@media (max-width: 480px) {
  a:active, button:active {
    background: #39ff14;
    color: black;
  }
  a, button {
    -webkit-tap-highlight-color: transparent;
  }
}

/* Light mode color overrides */
body.light h1 {
  color: #000000 !important;
}
body.light .about {
  color: #000000 !important;
}

/* ================= LANGUAGE TOGGLE ================= */
.lang-toggle {
  position: fixed;
  top: 18px;
  left: 18px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: #ffffff;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  z-index: 9999;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.08s ease;
}

.lang-toggle:hover {
  background: rgba(255,255,255,0.03);
}

.lang-toggle:active {
  transform: translateY(1px);
}

body.light .lang-toggle {
  border-color: rgba(0,0,0,0.08);
  color: #222222;
}

@media (max-width: 480px) {
  .lang-toggle {
    font-size: 0.85rem;
    padding: 6px 8px;
    border-radius: 6px;
  }
}

/* ============================================================
   DARK MODE
   ============================================================ */
body.dark,
body:not(.light) {
  background: #031019 !important;
  color: #e5ffe8 !important;
}

body.dark h1 {
  color: #39ff14 !important;
  text-shadow: 0 0 6px rgba(57,255,20,0.35);
}

body.dark .highlight {
  text-decoration-color: #39ff14 !important;
  text-shadow: 0 0 4px rgba(57,255,20,0.25);
}

body.dark .links a,
body.dark .submenu .dropdown a,
body.dark .email a,
body.dark .copy-btn {
  background: transparent !important;
  color: #d9ffd9 !important;
  border: 1px solid rgba(57,255,20,0.35) !important;
  transition: 0.25s ease;
}

body.dark .links a:hover,
body.dark .submenu .dropdown a:hover,
body.dark .email a:hover,
body.dark .copy-btn:hover {
  background: rgba(57,255,20,0.08) !important;
  color: #39ff14 !important;
  border-color: #39ff14 !important;
  text-shadow: 0 0 6px rgba(57,255,20,0.4);
}

body.dark .theme-toggle,
body.dark .lang-toggle {
  border-color: rgba(255,255,255,0.25) !important;
  color: #e5ffe8 !important;
}

body.dark .theme-toggle:hover,
body.dark .lang-toggle:hover {
  border-color: #39ff14 !important;
  color: #39ff14 !important;
}

/* Dark mode: knob left */
body.dark .theme-toggle {
  background: #111;
  justify-content: flex-start;
}
body.dark .theme-toggle::before {
  background: #39ff14;
  transform: translateX(0);
}

/* ============================================================
   LIGHT MODE
   ============================================================ */
body.light {
  background: #F0EEE6 !important;
  color: #1a1a1a !important;
}

body.light h1 {
  color: #25d80f !important;
}

body.light .highlight {
  text-decoration-color: #25d80f !important;
}

body.light .links a,
body.light .submenu .dropdown a,
body.light .email a,
body.light .copy-btn {
  background: transparent !important;
  color: #1a1a1a !important;
  border: 1px solid rgba(37,216,15,0.6) !important;
  transition: 0.25s ease;
}

body.light .links a:hover,
body.light .submenu .dropdown a:hover,
body.light .email a:hover,
body.light .copy-btn:hover {
  background: rgba(37,216,15,0.1) !important;
  color: #25d80f !important;
  border-color: #25d80f !important;
}

body.light .theme-toggle,
body.light .lang-toggle {
  color: #1a1a1a !important;
  border-color: rgba(0,0,0,0.2) !important;
}

body.light .theme-toggle:hover,
body.light .lang-toggle:hover {
  border-color: #25d80f !important;
  color: #25d80f !important;
}

/* Light mode: knob right */
body.light .theme-toggle {
  background: #F0EEE6;
  border: 1px solid rgba(0,0,0,0.2);
  justify-content: flex-end;
}
body.light .theme-toggle::before {
  background: #25d80f;
  transform: translateX(0);
}

/* ================= SECRET HOVER ================= */
.secret-hover {
  text-align: center;
  margin-top: 12px;
  cursor: pointer;
}

.secret-text {
  opacity: 0;
  display: inline-block;
  background: rgba(0,0,0,0.8);
  color: #39ff14;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.secret-hover:hover .secret-text {
  opacity: 1;
}

/* ================= FOOTER ================= */
.site-footer {
  width: 100%;
  text-align: center;
  font-size: 0.4rem;
  padding: 16px 10px;
  opacity: 0.7;
}

.site-footer a {
  color: inherit;
  text-decoration: underline;
}

.site-footer a:hover {
  opacity: 1;
}

body.dark .site-footer {
  color: #e5ffe8;
}

body.light .site-footer {
  color: #1a1a1a;
}

@media (max-width: 480px) {
  .site-footer {
    font-size: 0.4rem;
    padding: 12px 8px;
  }
}
/* ================= BACK BUTTON ================= */
.back-btn {
  position: fixed;
  top: 18px;
  left: 18px;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 8px 10px;
  border-radius: 8px;
  z-index: 9999;
  transition: color 0.2s ease, border-color 0.2s ease;
}

body.dark .back-btn,
body:not(.light) .back-btn {
  color: #e5ffe8;
  border: 1px solid rgba(255,255,255,0.25);
}

body.dark .back-btn:hover,
body:not(.light) .back-btn:hover {
  color: #39ff14;
  border-color: #39ff14;
}

body.light .back-btn {
  color: #1a1a1a;
  border: 1px solid rgba(0,0,0,0.2);
}

body.light .back-btn:hover {
  color: #25d80f;
  border-color: #25d80f;
}
/* ================= BOOKS (untouched) ================= */
body.books-page #theme-toggle {
  top: 18px;
  right: 18px;
  left: auto;
  position: fixed;
  z-index: 9999;
}

.books-page-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  max-width: 650px;
  margin: 0 auto;
  padding: 20px;
}

.books-page-wrapper h2 {
  font-size: .5rem;
  margin-bottom: 1.5rem;
  text-decoration: underline;
  text-decoration-color: rgba(57, 255, 20, 0.4);
  text-decoration-thickness: 1.5px;
}

.books-list {
  list-style: none;
  padding: 0;
  margin: 2rem auto;
  text-align: center;
  max-width: 600px;
  font-size: 0.8rem;
  line-height: 1.3;
}

.books-list li {
  margin-bottom: 0.6rem;
  transition: color 0.25s ease, text-shadow 0.25s ease;
  cursor: default;
}

.books-list li .book-title {
  text-decoration: underline;
  text-decoration-color: rgba(57, 255, 20, 0.4);
  text-decoration-thickness: 1px;
  display: block;
  margin-bottom: 0.1em;
}

.books-list li .author {
  font-style: italic;
  display: block;
  margin-top: 0.05em;
}

body.dark .books-list li:hover {
  color: #39ff14;
  text-shadow: 0 0 6px rgba(57, 255, 20, 0.4);
}

body.light .books-list li:hover {
  color: #25d80f;
  text-shadow: 0 0 4px rgba(37, 216, 15, 0.35);
}