/* ======================= */
/* Import Fonts */
/* ======================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Montserrat:wght@600;700&display=swap');

/* ======================= */
/* CSS VARIABLES (THEME) */
/* Dark = default */
/* ======================= */
:root {
  --bg: #0f172a;
  --bg-alt: #020617;
  --text: #e5e7eb;
  --text-muted: #9ca3af;

  --primary: #38bdf8;
  --primary-hover: #0284c7;

  --btn-text: #020617;
  --shadow: rgba(0,0,0,0.4);
}

/* Light theme override */
[data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --text: #1f2937;
  --text-muted: #555;

  --primary: #007acc;
  --primary-hover: #005fa3;

  --btn-text: #ffffff;
  --shadow: rgba(0,0,0,0.1);
}

/* ======================= */
/* Global */
/* ======================= */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin: 0;
  line-height: 1.6;
  background-color: var(--bg);
  color: var(--text);
}

h1 {
  font-size: 3em;
}

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 1rem;
  color: var(--text);
}

/* ======================= */
/* Header & Footer         */
/* ======================= */
.site-header,
.site-footer {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background-color: var(--bg-alt);
}

.site-header {
  text-align: center;
  padding: 30px 10px;
  position: relative;
}

.site-footer {
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
  color: var(--text-muted);
}

/* ======================= */
/* Theme toogle and icon */
/* ======================= */
#theme-toggle {
  position: absolute;
  top: 20px;
  right: 40px;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  display: inline-flex;
  align-items: center; 
  gap: 8px;
  opacity: 0.75;
  border: none;
  outline: none;
}

#theme-toggle:hover {
  opacity: 1;
}

.theme-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  display: block;
}

/* ======================= */
/* Logo */
/* ======================= */
.logo-container {
  margin-bottom: 12px;
}

.site-logo {
  max-width: 200px;
  height: auto;
}

/* ======================= */
/* Navbar */
/* ======================= */
.site-nav {
  margin-top: 40px
}

.site-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  color: var(--btn-text);
  background: var(--primary);
  padding: 10px 22px;
  border-radius: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  box-shadow: 0 4px 8px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
}

.site-nav a:hover {
  text-decoration: none;
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 12px var(--shadow);
}

.site-nav a:active {
  transform: translateY(0);
}

/* ======================= */
/* Buttons */
/* ======================= */
.btn {
  display: inline-block;
  background: var(--primary);
  color: var(--btn-text);
  padding: 8px 18px;
  border-radius: 10px;
  font-weight: bold;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--shadow);
}

/* ======================= */
/* Back to top */
/* ======================= */
#back-to-top {
  text-decoration: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--primary);
  color: var(--btn-text);
  padding: 10px 15px;
  border-radius: 50px;
  font-weight: bold;
  box-shadow: 0 4px 6px var(--shadow);
  opacity: 0.75;
  transition: opacity 0.3s, transform 0.2s;
  z-index: 1000;
  display: none;
}

#back-to-top:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* ======================= */
/* Content */
/* ======================= */
.site-content {
  max-width: 960px;
  margin: 40px auto;
  padding: 0 20px;
}

/* ======================= */
/* Images */
/* ======================= */
img {
  max-width: 100%;
}

.screenshot {
  border-radius: 10px;
  box-shadow: 0 10px 25px var(--shadow);
  margin: 1.5rem 0 0 0;
}

/* ======================= */
/* Links */
/* ======================= */
a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ======================= */
/* Mobile navbar */
/* ======================= */
@media (max-width: 600px) {
  .site-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }

  .site-nav a {
    width: 90%;
    max-width: 320px;
    text-align: center;
  }

  #theme-toggle {
    padding: 6px 10px;
    font-size: 1rem;
  }

  #theme-toggle span {
    display: none;
  }
}

/* ======================= */
/* Mobile Theme toogle */
/* ======================= */
@media (max-width: 600px) {

  #theme-toggle {
    padding: 6px 10px;
    font-size: 1rem;
  }

  #theme-toggle span {
    display: none;
  }

  #back-to-top {
    display: none !important;
  }
}