@import "normalize.css";

:root {
  --theme-color-primary: #6c5ce7;
  --theme-color-secondary: #a29bfe;
  --nav-bg: #ffffff;
  --nav-text: #333333;
  --nav-hover: var(--theme-color-primary);
  --github-bg: #f6f8fa;
  --card-bg: #ffffff;
  --text-color: #333333;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

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

html {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;

  display: flex;
  justify-content: flex-start;
  flex-direction: column;
  align-items: center;
  line-height: 1.6;

  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--text-color);
  background: #f9f9f9;
}

header,
main,
footer {
  width: 100%;
}

main {
  flex-grow: 2;
}

h1 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 10px;
}

h2 {
  font-size: 1.2rem;
  text-align: center;
  color: var(--theme-color-primary);
  margin-top: 2rem;
}

h3 {
  font-size: 1rem;
  color: var(--theme-color-primary);
  text-align: center;
  margin: 0;
  font-weight: 400;
}

p {
  color: var(--text-color);
  max-width: 600px;
  margin: 0 auto 2rem;
}

pre {
  text-align: center;
  margin: 0 auto 2rem;
  overflow: auto;
}

code {
  overflow: auto;
}

ul {
  text-align: center;
  margin: 0 auto 2rem;
}

li {
  list-style: none;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  margin-top: 1rem;
  color: var(--text-color);
  opacity: 0.8;
}

footer p {
  margin-bottom: 0;
}

/* content */
.content-container {
  width: 100%;
  max-width: 1200px;

  margin: 0 auto;
  padding: 20px;
}

.content-container p {
  text-align: center;
}

.content-header {
  margin-bottom: 25px;
}

.content {
  max-width: 900px;

  background: var(--card-bg);
  border: 1px solid var(--shadow-color);
  border-radius: 8px;
  box-shadow: 0 2px 6px var(--shadow-color);

  padding: 1rem;
  margin: 0 auto;
}

.content~.content {
  margin-top: 40px;
}

.width-limited-section div {
  max-width: 900px;
}

/* dark mode */
body.dark-mode {
  --nav-bg: #121212;
  --nav-text: #ffffff;
  --nav-hover: var(--theme-color-secondary);
  --github-bg: #0d1117;
  --card-bg: #232325;
  --text-color: #f0f0f0;
  --shadow-color: rgba(255, 255, 255, 0.05);
}

* {
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

/* Styles for dark mode */
body.dark-mode {
  background-color: #121212;
}

/* Dark Mode Toggle */
.dark-mode-button-container {
  margin-left: auto;
  padding-left: 2rem;
  text-align: right;

  display: flex;
  justify-content: center;
}

@media (max-width: 768px) {
  .dark-mode-button-container {
    scale: 0.8;
  }
}

.mode-toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
  background-color: #ccc;
  border-radius: 15px;
  cursor: pointer;
  overflow: hidden;
}

.mode-toggle-switch.active {
  background-color: #2e2e31;
}

.mode-toggle-switch::before {
  content: "🌙";
  position: absolute;
  right: 12%;
  top: 55%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  z-index: 1;
}

.mode-toggle-switch.active::before {
  content: "☀️";
  right: unset;
  left: 10%;
}

.mode-toggle-switch::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  top: 3px;
  left: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  z-index: 2;
}

.mode-toggle-switch.active::after {
  background-color: #7d7d7d;
  transform: translateX(30px);
}

/* end of dark mode */

/* Navigation */
.top-navbar {
  background-color: var(--nav-bg);
  box-shadow: 0 2px 10px var(--shadow-color);
  width: 100%;
  position: relative;
  top: 0;
  left: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container {
    /* flex-direction: column; */
    gap: 1rem;
    padding: 1rem;
  }
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--theme-color-primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  padding: 10px 0;
  text-align: unset;
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    gap: 1rem;
  }
}

.nav-links a {
  color: var(--nav-text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a:hover {
  color: var(--nav-hover);
}

.nav-links a.active {
  color: var(--theme-color-primary);
  font-weight: 600;
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--theme-color-primary);
}

/* Nav Popup Style */
.navi-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

body.dark-mode .navi-popup-overlay {
  background: rgba(0, 0, 0, 0.9);
}

.navi-popup {
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 10px 30px var(--shadow-color);
  z-index: 1000;
  transition: top 0.3s ease-out;
}

.navi-popup h3 {
  color: var(--theme-color-primary);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.navi-popup ul {
  list-style: none;
}

.navi-popup ul li {
  margin: 1rem 0;
  text-align: center;
}

.navi-popup ul li a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.2s;
}

.navi-popup ul li a:hover {
  color: var(--theme-color-primary);
}

.close-popup {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
}

/* Mobile Optimizasyon */
@media (max-width: 768px) {
  .navi-popup {
    width: 95%;
    padding: 1.5rem;
  }
}

/* Features Section */
.feature-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 5px 15px var(--shadow-color);
  text-align: center;
}

.feature-card:hover {
  /* transform: translateY(-5px); */
}

.feature-card div {
  font-size: 2rem;
  color: var(--theme-color-primary);
  margin-bottom: 1.2rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature-card p {
  margin-bottom: 1rem;
}